ports/145744: [PATCH] devel/apr: fix make install/deinstall

Sunpoet Po-Chuan Hsieh sunpoet at sunpoet.net
Fri Apr 16 04:30:03 UTC 2010


>Number:         145744
>Category:       ports
>Synopsis:       [PATCH] devel/apr: fix make install/deinstall
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri Apr 16 04:30:02 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator:     Sunpoet Po-Chuan Hsieh
>Release:        FreeBSD 8.0-STABLE amd64
>Organization:
SUNPOET.net
>Environment:
System: FreeBSD bonjour.sunpoet.net 8.0-STABLE FreeBSD 8.0-STABLE #0: Fri Mar 19 09:16:38 CST 2010
>Description:
Changes:
- Fix make install/deinstall by adding explicit --without APU_CONF_ARGS [1]
- Simplified option ifs
- Sort apr-util related options
- Pet portlint
- Remove some spaces/tabs

[1] On my box, apr-util-1.3.9/dbd/apr_dbd_pgsql is enabled automatically.

% grep apr /usr/local/etc/ports.conf
devel/apr : WITHOUT_GDBM | WITHOUT_IPV6
% cd /usr/ports/devel/apr/
% make -V WITHOUT_PGSQL
true
% make configure
...
checking for pg_config... /usr/local/bin/pg_config
  adding "-I/usr/local/include" to CPPFLAGS
  setting LDFLAGS to "-L/usr/local/lib"
checking libpq-fe.h usability... yes
checking libpq-fe.h presence... yes
checking for libpq-fe.h... yes
checking for PQsendQueryPrepared in -lpq... yes
  adding "-I/usr/local/include" to APRUTIL_PRIV_INCLUDES
...
% cd `make -V WRKSRC`
% grep apu_have_pgsql apr-util-1.3.9/config.log
apu_have_pgsql='1'
% grep apr_dbd_pgsql apr-util-1.3.9/Makefile
APU_MODULES =   dbd/apr_dbd_pgsql.la dbm/apr_dbm_db.la

Thus, I got an error message while deinstalling APR.
===>  Deinstalling for devel/apr
===>   Deinstalling apr-db48-1.3.9.1.3.9_1
pkg_delete: unable to completely remove directory '/usr/local/lib/apr-util-1'
pkg_delete: couldn't entirely delete package (perhaps the packing list is incorrectly specified?)

% ls -Al /usr/local/lib/apr-util-1/
total 1
-rwxr-xr-x  1 root  wheel  25915 Feb 17 00:04 apr_dbd_pgsql-1.so*
-rw-r--r--  1 root  wheel  24166 Feb 17 00:04 apr_dbd_pgsql.a
-rwxr-xr-x  1 root  wheel   1014 Feb 17 00:04 apr_dbd_pgsql.la*
lrwxr-xr-x  1 root  wheel     18 Feb 17 00:04 apr_dbd_pgsql.so@ -> apr_dbd_pgsql-1.so

Port maintainer (pgollucci at FreeBSD.org) is cc'd.

Generated with FreeBSD Port Tools 0.99
>How-To-Repeat:
>Fix:

--- apr-db48-1.3.9.1.3.9_1.patch begins here ---
diff -ruN --exclude=CVS /usr/ports/sunpoet/apr/../../devel/apr/Makefile /usr/ports/sunpoet/apr/Makefile
--- /usr/ports/sunpoet/apr/../../devel/apr/Makefile	2009-12-25 08:43:24.000000000 +0800
+++ /usr/ports/sunpoet/apr/Makefile	2010-04-16 12:22:27.000000000 +0800
@@ -19,15 +19,15 @@
 
 MAKE_JOBS_SAFE=	yes
 
-OPTIONS=	THREADS "Enable Threads in apr"						on  \
-			IPV6	"Enable IPV6 Support in apr"				on	\
-			GDBM	"Enable GNU dbm support in apr-util"		on  \
-			BDB		"Enable Berkley BDB support in apr-util"	on  \
-			NDBM	"Enable NDBM support in apr-util"			off \
-			LDAP	"Enable LDAP support in apr-util"			off \
-			MYSQL	"Enable MySQL suport in apr-util"			off \
-			PGSQL	"Enable Postgresql suport in apr-util"		off \
-			SQLITE  "Enable SQLite3 support in apr-util"			off
+OPTIONS=	THREADS "Enable Threads in apr"				on \
+		IPV6	"Enable IPV6 Support in apr"			on \
+		BDB	"Enable Berkley BDB support in apr-util"	on \
+		GDBM	"Enable GNU dbm support in apr-util"		on \
+		LDAP	"Enable LDAP support in apr-util"		off \
+		MYSQL	"Enable MySQL suport in apr-util"		off \
+		NDBM	"Enable NDBM support in apr-util"		off \
+		PGSQL	"Enable Postgresql suport in apr-util"		off \
+		SQLITE  "Enable SQLite3 support in apr-util"		off
 
 APR_VERSION=	1.3.9
 APU_VERSION=	1.3.9
@@ -39,7 +39,7 @@
 USE_LDCONFIG=		yes
 GNU_CONFIGURE=		yes
 
-CONFIGURE_ENV=	CC="${CC}" CFLAGS="${CFLAGS}"
+CONFIGURE_ENV=	CC="${CC}"
 
 NO_WRKSUBDIR=	yes
 APR_WRKDIR=	${WRKDIR}/apr-${APR_VERSION}
@@ -50,8 +50,8 @@
 
 APR_CONF_ARGS=	--with-installbuilddir=${DATADIR}/build-1
 APU_CONF_ARGS=	--with-apr=${APR_WRKDIR} \
-			--with-expat=${LOCALBASE} \
-			--with-iconv=${LOCALBASE}
+		--with-expat=${LOCALBASE} \
+		--with-iconv=${LOCALBASE}
 
 .include <bsd.port.options.mk>
 
@@ -82,7 +82,7 @@
 .if defined(WITHOUT_GDBM)
 PLIST_SUB+=	GDBM="@comment "
 APU_CONF_ARGS+=	--without-gdbm
-.elif defined(WITH_GDBM)
+.else
 PLIST_SUB+=	GDBM=""
 APU_EXTRAS=	yes
 LIB_DEPENDS+=	gdbm.3:${PORTSDIR}/databases/gdbm
@@ -92,15 +92,12 @@
 .else
 PKGNAMESUFFIX=	-gdbm
 .endif
-.else
-PLIST_SUB+=	GDBM="@comment "
-APR_UTIL_CONF_ARGS+=	--without-gdbm
 .endif
 
 .if defined(WITHOUT_BDB)
 PLIST_SUB+=	BDB="@comment "
 APU_CONF_ARGS+=	--without-berkeley-db
-.elif defined(WITH_BDB)
+.else
 APU_EXTRAS=	yes
 PLIST_SUB+=	BDB=""
 USE_BDB=	42+
@@ -112,10 +109,7 @@
 .endif
 .endif
 
-.if defined(WITHOUT_NDBM)
-PLIST_SUB+=	NDBM="@comment "
-APU_CONF_ARGS+=	--without-ndbm
-.elif defined(WITH_NDBM)
+.if defined(WITH_NDBM)
 APU_EXTRAS=	yes
 PLIST_SUB+=	NDBM=""
 APU_CONF_ARGS+=	--with-ndbm=/usr
@@ -124,6 +118,9 @@
 .else
 PKGNAMESUFFIX=	-ndbm
 .endif
+.else
+PLIST_SUB+=	NDBM="@comment "
+APU_CONF_ARGS+=	--without-ndbm
 .endif
 
 .if defined(WITH_LDAP)
@@ -139,6 +136,7 @@
 .endif
 .else
 PLIST_SUB+=	LDAP="@comment "
+APU_CONF_ARGS+=	--without-ldap
 .endif
 
 .if defined(WITH_MYSQL)
@@ -156,6 +154,7 @@
 .endif
 .else
 PLIST_SUB+=	MYSQL="@comment "
+APU_CONF_ARGS+=	--without-mysql
 .endif
 
 .if defined(WITH_PGSQL)
@@ -171,21 +170,22 @@
 .endif
 .else
 PLIST_SUB+=	PGSQL="@comment "
+APU_CONF_ARGS+=	--without-pgsql
 .endif
 
 .if defined(WITH_SQLITE)
 APU_EXTRAS=	yes
 PLIST_SUB+=	SQLITE3=""
 USE_SQLITE=	YES
-CONFIGURE_ARGS+= --with-sqlite3=${LOCALBASE}
+APU_CONF_ARGS+=	--with-sqlite3=${LOCALBASE}
 .if defined(PKGNAMESUFFIX)
 PKGNAMESUFFIX:=	${PKGNAMESUFFIX}-sqlite3
 .else
 PKGNAMESUFFIX=	-sqlite3
 .endif
 .else
-CONFIGURE_ARGS+= --without-sqlite3
 PLIST_SUB+=	SQLITE3="@comment "
+APU_CONF_ARGS+=	--without-sqlite3
 .endif
 
 .if defined(APU_EXTRAS)
@@ -195,13 +195,13 @@
 .endif
 
 post-patch:
-	${REINPLACE_CMD} -e 's/OSVERSION/'${OSVERSION}'/g' \
+	${REINPLACE_CMD} -e 's/OSVERSION/${OSVERSION}/g' \
 		${APR_WRKDIR}/build/apr_hints.m4
 	${FIND} ${APR_WRKDIR} ${APU_WRKDIR} -name "Makefile.in*" | ${XARGS} ${REINPLACE_CMD} -e \
 		's|[(]libdir[)]/pkgconfig|(prefix)/libdata/pkgconfig|g'
 	${REINPLACE_CMD} -e 's,-lpthread,${PTHREAD_LIBS},g' \
 		${APR_WRKDIR}/build/apr_threads.m4 ${APR_WRKDIR}/build/apr_hints.m4 \
-		${APU_WRKDIR}/build/apu-conf.m4 
+		${APU_WRKDIR}/build/apu-conf.m4
 
 run-autotools::
 	cd ${APR_WRKDIR} ; \
--- apr-db48-1.3.9.1.3.9_1.patch ends here ---

>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list