Browse Source

reduce overhead and fix for OpenBSD pkg-config implementation

OpenBSD use a Perl implementation for pkg-config, which use
PKG_CONFIG_LIBDIR, so this shouldn't be /dev/null.
Using just PKG_CONFIG_LIBDIR to provide the cross-compiled
headers and libraries is even enough for normal pkg-config.
Waldemar Brodkorb 14 years ago
parent
commit
3e8d470073
1 changed files with 9 additions and 25 deletions
  1. 9 25
      mk/package.mk

+ 9 - 25
mk/package.mk

@@ -43,28 +43,19 @@ else
 CONFIGURE_ARGS+=	--disable-debug
 endif
 
-ifeq ($(ADK_NATIVE),y)
 CONFIGURE_ENV+=		CONFIG_SHELL='$(strip ${SHELL})' \
-			SHELL='$(strip ${SHELL})' \
 			CFLAGS='$(strip ${TCFLAGS})' \
 			CXXFLAGS='$(strip ${TCXXFLAGS})' \
 			CPPFLAGS='$(strip ${TCPPFLAGS})' \
 			LDFLAGS='$(strip ${TLDFLAGS})' \
-			PKG_CONFIG_PATH='${STAGING_DIR}/usr/lib/pkgconfig' \
-			PKG_CONFIG_LIBDIR=/dev/null
-else
+			PKG_CONFIG_LIBDIR='${STAGING_DIR}/usr/lib/pkgconfig'
+ifeq ($(ADK_NATIVE),)
 CONFIGURE_ENV+=		${TARGET_CONFIGURE_OPTS} \
 			${HOST_CONFIGURE_OPTS} \
-			CFLAGS='$(strip ${TCFLAGS})' \
-			CXXFLAGS='$(strip ${TCXXFLAGS})' \
-			CPPFLAGS='$(strip ${TCPPFLAGS})' \
-			LDFLAGS='$(strip ${TLDFLAGS})' \
-			PKG_CONFIG_PATH='${STAGING_DIR}/usr/lib/pkgconfig' \
-			PKG_CONFIG_LIBDIR=/dev/null \
-			CONFIG_SHELL='$(strip ${SHELL})' \
 			ac_cv_func_realloc_0_nonnull=yes \
 			ac_cv_func_malloc_0_nonnull=yes
 endif
+
 CONFIGURE_PROG?=	configure
 MAKE_FILE?=		Makefile
 # this is environment for 'make all' and 'make install'
@@ -77,33 +68,26 @@ MAKE_FLAGS?=
 FAKE_FLAGS?=
 ALL_TARGET?=		all
 INSTALL_TARGET?=	install
-ifeq ($(ADK_NATIVE),y)
-MAKE_ENV+=		\
-			WRKDIR='${WRKDIR}' WRKDIST='${WRKDIST}' \
+
+MAKE_ENV+=		WRKDIR='${WRKDIR}' WRKDIST='${WRKDIST}' \
 			WRKSRC='${WRKSRC}' WRKBUILD='${WRKBUILD}' \
 			CFLAGS='$(strip ${TCFLAGS})' \
 			CXXFLAGS='$(strip ${TCXXFLAGS})' \
 			CPPFLAGS='$(strip ${TCPPFLAGS})' \
 			LDFLAGS='$(strip ${TLDFLAGS})'
-else
+ifeq ($(ADK_NATIVE),)
 MAKE_ENV+=		PATH='${TARGET_PATH}' \
 			${HOST_CONFIGURE_OPTS} \
-			WRKDIR='${WRKDIR}' WRKDIST='${WRKDIST}' \
-			WRKSRC='${WRKSRC}' WRKBUILD='${WRKBUILD}' \
-			PKG_CONFIG_PATH='${STAGING_DIR}/usr/lib/pkgconfig' \
-			PKG_CONFIG_LIBDIR=/dev/null \
+			PKG_CONFIG_LIBDIR='${STAGING_DIR}/usr/lib/pkgconfig' \
 			CC='${TARGET_CC}' \
 			CXX='${TARGET_CXX}' \
 			AR='${TARGET_CROSS}ar' \
 			RANLIB='${TARGET_CROSS}ranlib' \
 			NM='${TARGET_CROSS}nm' \
 			STRIP='${TARGET_CROSS}strip' \
-			CROSS="$(TARGET_CROSS)" \
-			CFLAGS='$(strip ${TCFLAGS})' \
-			CXXFLAGS='$(strip ${TCXXFLAGS})' \
-			CPPFLAGS='$(strip ${TCPPFLAGS})' \
-			LDFLAGS='$(strip ${TLDFLAGS})'
+			CROSS="$(TARGET_CROSS)"
 endif
+
 MAKE_FLAGS+=		${XAKE_FLAGS} V=1
 FAKE_FLAGS+=		${XAKE_FLAGS}