head 1.28; access; symbols pkgsrc-2023Q4:1.27.0.82 pkgsrc-2023Q4-base:1.27 pkgsrc-2023Q3:1.27.0.80 pkgsrc-2023Q3-base:1.27 pkgsrc-2023Q2:1.27.0.78 pkgsrc-2023Q2-base:1.27 pkgsrc-2023Q1:1.27.0.76 pkgsrc-2023Q1-base:1.27 pkgsrc-2022Q4:1.27.0.74 pkgsrc-2022Q4-base:1.27 pkgsrc-2022Q3:1.27.0.72 pkgsrc-2022Q3-base:1.27 pkgsrc-2022Q2:1.27.0.70 pkgsrc-2022Q2-base:1.27 pkgsrc-2022Q1:1.27.0.68 pkgsrc-2022Q1-base:1.27 pkgsrc-2021Q4:1.27.0.66 pkgsrc-2021Q4-base:1.27 pkgsrc-2021Q3:1.27.0.64 pkgsrc-2021Q3-base:1.27 pkgsrc-2021Q2:1.27.0.62 pkgsrc-2021Q2-base:1.27 pkgsrc-2021Q1:1.27.0.60 pkgsrc-2021Q1-base:1.27 pkgsrc-2020Q4:1.27.0.58 pkgsrc-2020Q4-base:1.27 pkgsrc-2020Q3:1.27.0.56 pkgsrc-2020Q3-base:1.27 pkgsrc-2020Q2:1.27.0.52 pkgsrc-2020Q2-base:1.27 pkgsrc-2020Q1:1.27.0.32 pkgsrc-2020Q1-base:1.27 pkgsrc-2019Q4:1.27.0.54 pkgsrc-2019Q4-base:1.27 pkgsrc-2019Q3:1.27.0.50 pkgsrc-2019Q3-base:1.27 pkgsrc-2019Q2:1.27.0.48 pkgsrc-2019Q2-base:1.27 pkgsrc-2019Q1:1.27.0.46 pkgsrc-2019Q1-base:1.27 pkgsrc-2018Q4:1.27.0.44 pkgsrc-2018Q4-base:1.27 pkgsrc-2018Q3:1.27.0.42 pkgsrc-2018Q3-base:1.27 pkgsrc-2018Q2:1.27.0.40 pkgsrc-2018Q2-base:1.27 pkgsrc-2018Q1:1.27.0.38 pkgsrc-2018Q1-base:1.27 pkgsrc-2017Q4:1.27.0.36 pkgsrc-2017Q4-base:1.27 pkgsrc-2017Q3:1.27.0.34 pkgsrc-2017Q3-base:1.27 pkgsrc-2017Q2:1.27.0.30 pkgsrc-2017Q2-base:1.27 pkgsrc-2017Q1:1.27.0.28 pkgsrc-2017Q1-base:1.27 pkgsrc-2016Q4:1.27.0.26 pkgsrc-2016Q4-base:1.27 pkgsrc-2016Q3:1.27.0.24 pkgsrc-2016Q3-base:1.27 pkgsrc-2016Q2:1.27.0.22 pkgsrc-2016Q2-base:1.27 pkgsrc-2016Q1:1.27.0.20 pkgsrc-2016Q1-base:1.27 pkgsrc-2015Q4:1.27.0.18 pkgsrc-2015Q4-base:1.27 pkgsrc-2015Q3:1.27.0.16 pkgsrc-2015Q3-base:1.27 pkgsrc-2015Q2:1.27.0.14 pkgsrc-2015Q2-base:1.27 pkgsrc-2015Q1:1.27.0.12 pkgsrc-2015Q1-base:1.27 pkgsrc-2014Q4:1.27.0.10 pkgsrc-2014Q4-base:1.27 pkgsrc-2014Q3:1.27.0.8 pkgsrc-2014Q3-base:1.27 pkgsrc-2014Q2:1.27.0.6 pkgsrc-2014Q2-base:1.27 pkgsrc-2014Q1:1.27.0.4 pkgsrc-2014Q1-base:1.27 pkgsrc-2013Q4:1.27.0.2 pkgsrc-2013Q4-base:1.27 pkgsrc-2013Q3:1.25.0.4 pkgsrc-2013Q3-base:1.25 pkgsrc-2013Q2:1.25.0.2 pkgsrc-2013Q2-base:1.25 pkgsrc-2013Q1:1.24.0.8 pkgsrc-2013Q1-base:1.24 pkgsrc-2012Q4:1.24.0.6 pkgsrc-2012Q4-base:1.24 pkgsrc-2012Q3:1.24.0.4 pkgsrc-2012Q3-base:1.24 pkgsrc-2012Q2:1.24.0.2 pkgsrc-2012Q2-base:1.24 pkgsrc-2012Q1:1.23.0.14 pkgsrc-2012Q1-base:1.23 pkgsrc-2011Q4:1.23.0.12 pkgsrc-2011Q4-base:1.23 pkgsrc-2011Q3:1.23.0.10 pkgsrc-2011Q3-base:1.23 pkgsrc-2011Q2:1.23.0.8 pkgsrc-2011Q2-base:1.23 pkgsrc-2011Q1:1.23.0.6 pkgsrc-2011Q1-base:1.23 pkgsrc-2010Q4:1.23.0.4 pkgsrc-2010Q4-base:1.23 pkgsrc-2010Q3:1.23.0.2 pkgsrc-2010Q3-base:1.23 pkgsrc-2010Q2:1.22.0.2 pkgsrc-2010Q2-base:1.22 pkgsrc-2010Q1:1.20.0.10 pkgsrc-2010Q1-base:1.20 pkgsrc-2009Q4:1.20.0.8 pkgsrc-2009Q4-base:1.20 pkgsrc-2009Q3:1.20.0.6 pkgsrc-2009Q3-base:1.20 pkgsrc-2009Q2:1.20.0.4 pkgsrc-2009Q2-base:1.20 pkgsrc-2009Q1:1.20.0.2 pkgsrc-2009Q1-base:1.20 pkgsrc-2008Q4:1.16.0.16 pkgsrc-2008Q4-base:1.16 pkgsrc-2008Q3:1.16.0.14 pkgsrc-2008Q3-base:1.16 cube-native-xorg:1.16.0.12 cube-native-xorg-base:1.16 pkgsrc-2008Q2:1.16.0.10 pkgsrc-2008Q2-base:1.16 cwrapper:1.16.0.8 pkgsrc-2008Q1:1.16.0.6 pkgsrc-2008Q1-base:1.16 pkgsrc-2007Q4:1.16.0.4 pkgsrc-2007Q4-base:1.16 pkgsrc-2007Q3:1.16.0.2 pkgsrc-2007Q3-base:1.16 pkgsrc-2007Q2:1.14.0.18 pkgsrc-2007Q2-base:1.14 pkgsrc-2007Q1:1.14.0.16 pkgsrc-2007Q1-base:1.14 jlam-pkgviews:1.14.0.14 jlam-pkgviews-base:1.14 pkgsrc-2006Q4:1.14.0.12 pkgsrc-2006Q4-base:1.14 pkgsrc-2006Q3:1.14.0.10 pkgsrc-2006Q3-base:1.14 pkgsrc-2006Q2:1.14.0.8 pkgsrc-2006Q2-base:1.14 tv-derecurse-eol:1.6.2.6 pkgsrc-2006Q1:1.14.0.6 pkgsrc-2006Q1-base:1.14 pkgsrc-2005Q4:1.14.0.4 pkgsrc-2005Q4-base:1.14 pkgsrc-2005Q3:1.14.0.2 pkgsrc-2005Q3-base:1.14 pkgsrc-2005Q2:1.13.0.2 pkgsrc-2005Q2-base:1.13 tv-derecurse-merge:1.10 pkgsrc-2005Q1:1.10.0.2 pkgsrc-2005Q1-base:1.10 pkgsrc-2004Q4:1.7.0.2 pkgsrc-2004Q4-base:1.7 tv-derecurse-base:1.10 tv-derecurse:1.6.0.2; locks; strict; comment @# @; 1.28 date 2024.01.13.20.26.47; author riastradh; state Exp; branches; next 1.27; commitid my8xlviqHLVXqkUE; 1.27 date 2013.11.23.09.10.14; author obache; state Exp; branches; next 1.26; commitid A2FzxLO4eB58Inex; 1.26 date 2013.11.01.11.58.48; author jperkin; state Exp; branches; next 1.25; commitid i0kgPvYa7qBbmzbx; 1.25 date 2013.04.28.13.43.55; author obache; state Exp; branches; next 1.24; 1.24 date 2012.05.04.08.31.14; author obache; state Exp; branches; next 1.23; 1.23 date 2010.07.04.16.25.13; author obache; state Exp; branches; next 1.22; 1.22 date 2010.06.17.18.09.40; author drochner; state Exp; branches; next 1.21; 1.21 date 2010.06.16.19.57.08; author drochner; state Exp; branches; next 1.20; 1.20 date 2009.03.20.19.25.01; author joerg; state Exp; branches; next 1.19; 1.19 date 2009.01.23.14.21.38; author obache; state Exp; branches; next 1.18; 1.18 date 2009.01.23.13.07.25; author obache; state Exp; branches; next 1.17; 1.17 date 2009.01.23.11.23.28; author obache; state Exp; branches; next 1.16; 1.16 date 2007.10.03.08.56.07; author heinz; state Exp; branches; next 1.15; 1.15 date 2007.10.02.16.20.05; author heinz; state Exp; branches; next 1.14; 1.14 date 2005.06.26.13.11.22; author minskim; state Exp; branches; next 1.13; 1.13 date 2005.06.09.05.59.51; author jlam; state Exp; branches; next 1.12; 1.12 date 2005.06.08.08.13.05; author jlam; state Exp; branches; next 1.11; 1.11 date 2005.06.01.18.03.06; author jlam; state Exp; branches; next 1.10; 1.10 date 2005.01.20.15.22.39; author jlam; state Exp; branches; next 1.9; 1.9 date 2005.01.03.04.57.51; author minskim; state Exp; branches; next 1.8; 1.8 date 2004.12.23.14.27.04; author jlam; state Exp; branches; next 1.7; 1.7 date 2004.12.02.15.04.16; author jlam; state Exp; branches 1.7.2.1; next 1.6; 1.6 date 2004.11.28.05.44.34; author jlam; state Exp; branches 1.6.2.1; next 1.5; 1.5 date 2004.11.26.21.04.46; author jlam; state Exp; branches; next 1.4; 1.4 date 2004.11.26.17.42.42; author jlam; state Exp; branches; next 1.3; 1.3 date 2004.11.26.08.26.51; author jlam; state Exp; branches; next 1.2; 1.2 date 2004.11.26.08.15.25; author jlam; state Exp; branches; next 1.1; 1.1 date 2004.11.26.07.05.19; author jlam; state Exp; branches; next ; 1.7.2.1 date 2005.01.29.00.30.08; author salo; state Exp; branches; next ; 1.6.2.1 date 2004.11.28.05.44.34; author tv; state dead; branches; next 1.6.2.2; 1.6.2.2 date 2004.11.28.20.11.32; author tv; state Exp; branches; next 1.6.2.3; 1.6.2.3 date 2004.12.03.19.15.00; author tv; state Exp; branches; next 1.6.2.4; 1.6.2.4 date 2004.12.31.20.25.30; author tv; state Exp; branches; next 1.6.2.5; 1.6.2.5 date 2005.01.10.16.15.25; author tv; state Exp; branches; next 1.6.2.6; 1.6.2.6 date 2005.01.24.18.40.01; author tv; state Exp; branches; next 1.6.2.7; 1.6.2.7 date 2006.06.07.15.25.39; author tv; state dead; branches; next ; desc @@ 1.28 log @buildlink3, mk/*.builtin.mk: Use TOOLS_CROSS_DESTDIR for file checks. These are always about the target system, which during cross builds, or native builds of cross-libtool-base, is relative to TOOLS_CROSS_DESTDIR. This is necessary for cross-libtool-base -- the one special package that is built as a native package as if it were cross-compiled, so _CROSS_DESTDIR is empty but TOOLS_CROSS_DESTDIR is the cross destdir -- because cross-libtool-base uses buildlink3 and dlopen.builtin.mk. No change to native builds because _CROSS_DESTDIR and TOOLS_CROSS_DESTDIR are both empty in native builds. XXX Perhaps almost every use of _CROSS_DESTDIR outside mk/pkgformat should be replaced by TOOLS_CROSS_DESTDIR. @ text @# $NetBSD: dlopen.builtin.mk,v 1.27 2013/11/23 09:10:14 obache Exp $ BUILTIN_PKG:= dl BUILTIN_FIND_LIBS:= dl BUILTIN_FIND_HEADERS_VAR:= H_DL BUILTIN_FIND_HEADERS.H_DL= dlfcn.h .include "../../mk/buildlink3/bsd.builtin.mk" ### ### Determine if there is a built-in implementation of the package and ### set IS_BUILTIN. appropriately ("yes" or "no"). ### .if !defined(IS_BUILTIN.dl) IS_BUILTIN.dl= no . if empty(H_DL:M${LOCALBASE}/*) && exists(${TOOLS_CROSS_DESTDIR}${H_DL}) IS_BUILTIN.dl= yes . endif .endif MAKEVARS+= IS_BUILTIN.dl ### ### Determine whether we should use the built-in implementation if it ### exists, and set USE_BUILTIN. appropriate ("yes" or "no"). ### # # We ignore the value of PREFER_PKGSRC and PREFER_NATIVE because for every # platform (unless overridden in the platform file), we can only use the # built-in dynamic linker functions. # .if !defined(USE_BUILTIN.dl) USE_BUILTIN.dl= ${IS_BUILTIN.dl} .endif MAKEVARS+= USE_BUILTIN.dl # The following platforms require pthreads to be linked into the # application if it uses dlopen() or else the applications will core # dump when they dlopen a shared module that _is_ linked with pthread # support. # It is not required for NetBSD>=5 if just linked with pthread or using # pthread_mutex_*(), but need if using pthread_create() / pthread_join(). # _BLNK_DLOPEN_REQUIRE_PTHREAD_PLATFORMS= \ NetBSD-2.[0-9]_*-* \ NetBSD-2.[0-9]-* NetBSD-2.[0-9].[0-9]*-* \ NetBSD-2.[0-8][0-9]*-* NetBSD-2.9[0-8]*-* \ NetBSD-2.99.[0-9]-* NetBSD-2.99.10-* \ NetBSD-[3-9]*-* \ NetBSD-[1-9][0-9]*-* \ OpenBSD-*-* .if !defined(_BLNK_DLOPEN_REQUIRE_PTHREADS) _BLNK_DLOPEN_REQUIRE_PTHREADS?= no . for _pattern_ in ${_BLNK_DLOPEN_REQUIRE_PTHREAD_PLATFORMS} . if !empty(MACHINE_PLATFORM:M${_pattern_}) . if !empty(PREFER_NATIVE_PTHREADS:M[yY][eE][sS]) _BLNK_DLOPEN_REQUIRE_PTHREADS= yes . endif . endif . endfor .endif MAKEVARS+= _BLNK_DLOPEN_REQUIRE_PTHREADS # # DLOPEN_REQUIRE_PTHREADS is a user- and package-settable yes/no variable # whose value decides whether pthread.buildlink3.mk is automatically # included or not. Its default value depends on whether native # pthreads exist. # .if defined(DLOPEN_REQUIRE_PTHREADS) _BLNK_DLOPEN_REQUIRE_PTHREADS:= ${DLOPEN_REQUIRE_PTHREADS} .else DLOPEN_REQUIRE_PTHREADS= ${_BLNK_DLOPEN_REQUIRE_PTHREADS} .endif ### ### The section below only applies if we are not including this file ### solely to determine whether a built-in implementation exists. ### CHECK_BUILTIN.dl?= no .if !empty(CHECK_BUILTIN.dl:M[nN][oO]) . if !empty(USE_BUILTIN.dl:M[yY][eE][sS]) . if empty(H_DL:M__nonexistent__) . if !empty(H_DL:M/usr/*) BUILDLINK_PREFIX.dl= /usr . else BUILDLINK_PREFIX.dl= # empty . endif . endif . if !empty(BUILTIN_LIB_FOUND.dl:M[yY][eE][sS]) # # No need to add this to BUILDLINK_LIBS.dl since most GNU configure # scripts already check for -ldl themselves. # BUILDLINK_LDADD.dl= -ldl . endif . if !empty(_BLNK_DLOPEN_REQUIRE_PTHREADS:M[yY][eE][sS]) . include "../../mk/pthread.buildlink3.mk" . include "../../mk/pthread.builtin.mk" BUILDLINK_CFLAGS.dl+= ${PTHREAD_CFLAGS} BUILDLINK_LDFLAGS.dl+= ${PTHREAD_LDFLAGS} BUILDLINK_LIBS.dl+= ${PTHREAD_LIBS} . endif . endif .endif # CHECK_BUILTIN.dl @ 1.27 log @Use find-headers instead of find-files to detect builtin header files. @ text @d1 1 a1 1 # $NetBSD: dlopen.builtin.mk,v 1.26 2013/11/01 11:58:48 jperkin Exp $ d17 1 a17 1 . if empty(H_DL:M${LOCALBASE}/*) && exists(${H_DL}) @ 1.26 log @Move platform-specific code to the platform file. @ text @d1 1 a1 1 # $NetBSD: dlopen.builtin.mk,v 1.25 2013/04/28 13:43:55 obache Exp $ d6 2 a7 4 BUILTIN_FIND_FILES_VAR:= H_DL BUILTIN_FIND_FILES.H_DL= /usr/include/dlfcn.h \ /opt/gcc.3.3/include/dlfcn.h \ /boot/develop/headers/posix/dlfcn.h @ 1.25 log @Fixes builtin dl prefix other than /usr. @ text @d1 1 a1 1 # $NetBSD: dlopen.builtin.mk,v 1.24 2012/05/04 08:31:14 obache Exp $ d30 3 a32 3 # We ignore the value of PREFER_PKGSRC and PREFER_NATIVE because for # every platform except for Darwin-[56].*, we can only use the built-in # dynamic linker functions, so USE_BUILTIN.dl must match IS_BUILTIN.dl. d35 1 a35 4 USE_BUILTIN.dl= ${IS_BUILTIN.dl} . if !empty(MACHINE_PLATFORM:MDarwin-[56].*) USE_BUILTIN.dl= no # Darwin-[56].* uses devel/dlcompat . endif @ 1.24 log @dlopen require pthread on OpenBSD too. @ text @d1 1 a1 1 # $NetBSD: dlopen.builtin.mk,v 1.23 2010/07/04 16:25:13 obache Exp $ d89 2 a90 1 . if empty(H_DL:M__nonexistent__) && !empty(H_DL:M/usr/*) d92 3 @ 1.23 log @Add builtin support for Haiku. @ text @d1 1 a1 1 # $NetBSD: dlopen.builtin.mk,v 1.22 2010/06/17 18:09:40 drochner Exp $ d55 2 a56 1 NetBSD-[1-9][0-9]*-* @ 1.22 log @back out previous -- it can cause problems at least with apache-1, and fixing things is too much during freeze @ text @d1 1 a1 1 # $NetBSD: dlopen.builtin.mk,v 1.20 2009/03/20 19:25:01 joerg Exp $ d8 2 a9 1 /opt/gcc.3.3/include/dlfcn.h d88 1 d90 1 @ 1.21 log @drop the rule that programs which use dlopen() must link against libpthread -- it is generally under the program's control which modules to load, a general rule is just too much I've been using this modification for over a year without problems. @ text @d41 38 d95 7 @ 1.20 log @Simply and speed up buildlink3.mk files and processing. This changes the buildlink3.mk files to use an include guard for the recursive include. The use of BUILDLINK_DEPTH, BUILDLINK_DEPENDS, BUILDLINK_PACKAGES and BUILDLINK_ORDER is handled by a single new variable BUILDLINK_TREE. Each buildlink3.mk file adds a pair of enter/exit marker, which can be used to reconstruct the tree and to determine first level includes. Avoiding := for large variables (BUILDLINK_ORDER) speeds up parse time as += has linear complexity. The include guard reduces system time by avoiding reading files over and over again. For complex packages this reduces both %user and %sys time to half of the former time. @ text @d1 1 a1 1 # $NetBSD: dlopen.builtin.mk,v 1.19 2009/01/23 14:21:38 obache Exp $ a40 38 # The following platforms require pthreads to be linked into the # application if it uses dlopen() or else the applications will core # dump when they dlopen a shared module that _is_ linked with pthread # support. # It is not required for NetBSD>=5 if just linked with pthread or using # pthread_mutex_*(), but need if using pthread_create() / pthread_join(). # _BLNK_DLOPEN_REQUIRE_PTHREAD_PLATFORMS= \ NetBSD-2.[0-9]_*-* \ NetBSD-2.[0-9]-* NetBSD-2.[0-9].[0-9]*-* \ NetBSD-2.[0-8][0-9]*-* NetBSD-2.9[0-8]*-* \ NetBSD-2.99.[0-9]-* NetBSD-2.99.10-* \ NetBSD-[3-9]*-* \ NetBSD-[1-9][0-9]*-* .if !defined(_BLNK_DLOPEN_REQUIRE_PTHREADS) _BLNK_DLOPEN_REQUIRE_PTHREADS?= no . for _pattern_ in ${_BLNK_DLOPEN_REQUIRE_PTHREAD_PLATFORMS} . if !empty(MACHINE_PLATFORM:M${_pattern_}) . if !empty(PREFER_NATIVE_PTHREADS:M[yY][eE][sS]) _BLNK_DLOPEN_REQUIRE_PTHREADS= yes . endif . endif . endfor .endif MAKEVARS+= _BLNK_DLOPEN_REQUIRE_PTHREADS # # DLOPEN_REQUIRE_PTHREADS is a user- and package-settable yes/no variable # whose value decides whether pthread.buildlink3.mk is automatically # included or not. Its default value depends on whether native # pthreads exist. # .if defined(DLOPEN_REQUIRE_PTHREADS) _BLNK_DLOPEN_REQUIRE_PTHREADS:= ${DLOPEN_REQUIRE_PTHREADS} .else DLOPEN_REQUIRE_PTHREADS= ${_BLNK_DLOPEN_REQUIRE_PTHREADS} .endif a56 7 . if !empty(_BLNK_DLOPEN_REQUIRE_PTHREADS:M[yY][eE][sS]) . include "../../mk/pthread.buildlink3.mk" . include "../../mk/pthread.builtin.mk" BUILDLINK_CFLAGS.dl+= ${PTHREAD_CFLAGS} BUILDLINK_LDFLAGS.dl+= ${PTHREAD_LDFLAGS} BUILDLINK_LIBS.dl+= ${PTHREAD_LIBS} . endif @ 1.19 log @Update DLOPEN_REQUIRE_PTHREADS pattern again. Even on NetBSD>=5, need to link pthread if using pthread_create()/join(). @ text @d1 1 a1 1 # $NetBSD: dlopen.builtin.mk,v 1.18 2009/01/23 13:07:25 obache Exp $ a95 1 BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+ a96 1 BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:S/+$//} @ 1.18 log @Fixes DLOPEN_REQUIRE_PTHREADS patterns. NetBSD-3 was lost by previous commit, and NetBSD-5_BETA does not require pthread. (TODO: 4.99.*...) @ text @d1 1 a1 1 # $NetBSD: dlopen.builtin.mk,v 1.17 2009/01/23 11:23:28 obache Exp $ d45 2 d53 2 a54 1 NetBSD-[3-4]*-* @ 1.17 log @Added NetBSD>=4 to the list of platforms which need pthreads linked into the application if it uses dlopen(). This pattern should be changed if confirmed fixed in NetBSD-current. @ text @d1 1 a1 1 # $NetBSD: dlopen.builtin.mk,v 1.16 2007/10/03 08:56:07 heinz Exp $ d51 1 a51 1 NetBSD-[4-9]*-* @ 1.16 log @Additional pattern matching NetBSD-3.1_STABLE-i386, forgotten in the last commit (Thanks to Jukka Salmi for noting this). @ text @d1 1 a1 1 # $NetBSD: dlopen.builtin.mk,v 1.15 2007/10/02 16:20:05 heinz Exp $ d51 1 a51 2 NetBSD-3.[0-9]_*-* \ NetBSD-3.[0-9]-* NetBSD-3.[0-9].[0-9]*-* @ 1.15 log @Added NetBSD 3 to the list of platforms which need pthreads linked into the application if it uses dlopen(). This change was triggered by the longstanding bug that mod_perl (due to perl itself) was built with threads but apache was not, thus leading to incompatibility between apache and mod_perl. Whether NetBSD 4 needs to be added as well is still an open question. @ text @d1 1 a1 1 # $NetBSD: dlopen.builtin.mk,v 1.14 2005/06/26 13:11:22 minskim Exp $ d51 1 @ 1.14 log @Darwin>=7.0 does not need devel/dlcompat. @ text @d1 1 a1 1 # $NetBSD: dlopen.builtin.mk,v 1.13 2005/06/09 05:59:51 jlam Exp $ d50 2 a51 1 NetBSD-2.99.[0-9]-* NetBSD-2.99.10-* @ 1.13 log @Clarify why dlopen.builtin.mk ignores PREFER_* values. @ text @d1 1 a1 1 # $NetBSD: dlopen.builtin.mk,v 1.12 2005/06/08 08:13:05 jlam Exp $ d30 1 a30 1 # every platform except for Darwin, we can only use the built-in d35 2 a36 2 . if ${OPSYS} == "Darwin" USE_BUILTIN.dl= no # Darwin uses devel/dlcompat @ 1.12 log @The USE_BUILTIN.dl code got too complex in the previous commit. Simplify it so that USE_BUILTIN.dl is simply IS_BUILTIN.dl except for Darwin's special case. This makes PREFER_PKGSRC=yes work again on NetBSD instead of causing USE_BUILTIN.dl=no to be set, which is impossible. @ text @d1 1 a1 1 # $NetBSD: dlopen.builtin.mk,v 1.11 2005/06/01 18:03:06 jlam Exp $ d28 5 @ 1.11 log @Massive cleanup of buildlink3.mk and builtin.mk files in pkgsrc. Several changes are involved since they are all interrelated. These changes affect about 1000 files. The first major change is rewriting bsd.builtin.mk as well as all of the builtin.mk files to follow the new example in bsd.builtin.mk. The loop to include all of the builtin.mk files needed by the package is moved from bsd.builtin.mk and into bsd.buildlink3.mk. bsd.builtin.mk is now included by each of the individual builtin.mk files and provides some common logic for all of the builtin.mk files. Currently, this includes the computation for whether the native or pkgsrc version of the package is preferred. This causes USE_BUILTIN.* to be correctly set when one builtin.mk file includes another. The second major change is teach the builtin.mk files to consider files under ${LOCALBASE} to be from pkgsrc-controlled packages. Most of the builtin.mk files test for the presence of built-in software by checking for the existence of certain files, e.g. , and we now assume that if that file is under ${LOCALBASE}, then it must be from pkgsrc. This modification is a nod toward LOCALBASE=/usr. The exceptions to this new check are the X11 distribution packages, which are handled specially as noted below. The third major change is providing builtin.mk and version.mk files for each of the X11 distribution packages in pkgsrc. The builtin.mk file can detect whether the native X11 distribution is the same as the one provided by pkgsrc, and the version.mk file computes the version of the X11 distribution package, whether it's built-in or not. The fourth major change is that the buildlink3.mk files for X11 packages that install parts which are part of X11 distribution packages, e.g. Xpm, Xcursor, etc., now use imake to query the X11 distribution for whether the software is already provided by the X11 distribution. This is more accurate than grepping for a symbol name in the imake config files. Using imake required sprinkling various builtin-imake.mk helper files into pkgsrc directories. These files are used as input to imake since imake can't use stdin for that purpose. The fifth major change is in how packages note that they use X11. Instead of setting USE_X11, package Makefiles should now include x11.buildlink3.mk instead. This causes the X11 package buildlink3 and builtin logic to be executed at the correct place for buildlink3.mk and builtin.mk files that previously set USE_X11, and fixes packages that relied on buildlink3.mk files to implicitly note that X11 is needed. Package buildlink3.mk should also include x11.buildlink3.mk when linking against the package libraries requires also linking against the X11 libraries. Where it was obvious, redundant inclusions of x11.buildlink3.mk have been removed. @ text @d1 1 a1 1 # $NetBSD: dlopen.builtin.mk,v 1.10 2005/01/20 15:22:39 jlam Exp $ d29 2 a30 19 . if ${PREFER.dl} == "pkgsrc" USE_BUILTIN.dl= no . else USE_BUILTIN.dl= ${IS_BUILTIN.dl} . if defined(BUILTIN_PKG.dl) && \ !empty(IS_BUILTIN.dl:M[yY][eE][sS]) USE_BUILTIN.dl= yes . for _dep_ in ${BUILDLINK_DEPENDS.dl} . if !empty(USE_BUILTIN.dl:M[yY][eE][sS]) USE_BUILTIN.dl!= \ if ${PKG_ADMIN} pmatch ${_dep_:Q} ${BUILTIN_PKG.dl:Q}; then \ ${ECHO} yes; \ else \ ${ECHO} no; \ fi . endif . endfor . endif . if ${OPSYS} == "Darwin" d32 1 a32 2 . endif . endif # PREFER.dl @ 1.10 log @Also match NetBSD security releases, e.g. 2.0.1, when deciding whether using dlopen() implies linking against libpthread. Idea for fix from PR pkg/29022 and probably also fixes PR pkg/28800. @ text @d1 1 a1 1 # $NetBSD: dlopen.builtin.mk,v 1.9 2005/01/03 04:57:51 minskim Exp $ d3 8 a10 14 .for _lib_ in dl . if !defined(_BLNK_LIB_FOUND.${_lib_}) _BLNK_LIB_FOUND.${_lib_}!= \ if ${TEST} "`${ECHO} /usr/lib/lib${_lib_}.*`" != "/usr/lib/lib${_lib_}.*"; then \ ${ECHO} "yes"; \ elif ${TEST} "`${ECHO} /lib/lib${_lib_}.*`" != "/lib/lib${_lib_}.*"; then \ ${ECHO} "yes"; \ else \ ${ECHO} "no"; \ fi BUILDLINK_VARS+= _BLNK_LIB_FOUND.${_lib_} . endif .endfor .undef _lib_ d12 4 d17 3 a19 3 IS_BUILTIN.dl= no . if exists(/usr/include/dlfcn.h) || exists(/opt/gcc.3.3/include/dlfcn.h) IS_BUILTIN.dl= yes d21 2 a22 2 BUILDLINK_VARS+= IS_BUILTIN.dl .endif # IS_BUILTIN.pthread d24 4 d29 19 a47 2 USE_BUILTIN.dl= ${IS_BUILTIN.dl} . if ${OPSYS} == "Darwin" d49 2 a50 1 . endif d52 2 a53 1 # d59 1 a59 1 _DLOPEN_REQUIRE_PTHREAD_PLATFORMS= \ d65 7 a71 5 _DLOPEN_REQUIRE_PTHREADS?= no .for _pattern_ in ${_DLOPEN_REQUIRE_PTHREAD_PLATFORMS} . if !empty(MACHINE_PLATFORM:M${_pattern_}) . if !empty(PREFER_NATIVE_PTHREADS:M[yY][eE][sS]) _DLOPEN_REQUIRE_PTHREADS= yes d73 3 a75 2 . endif .endfor d83 1 a83 1 _DLOPEN_REQUIRE_PTHREADS:= ${DLOPEN_REQUIRE_PTHREADS} d85 1 a85 1 DLOPEN_REQUIRE_PTHREADS= ${_DLOPEN_REQUIRE_PTHREADS} d88 4 d97 1 a97 1 . if !empty(_BLNK_LIB_FOUND.dl:M[yY][eE][sS]) d104 1 a104 1 . if !empty(_DLOPEN_REQUIRE_PTHREADS:M[yY][eE][sS]) d113 1 a113 1 . endif # USE_BUILTIN.dl == yes @ 1.9 log @Make IS_BUILTIN.dl work on Interix. Patch provided by Hiramatsu Yoshifumi in PR pkg/28836. @ text @d1 1 a1 1 # $NetBSD: dlopen.builtin.mk,v 1.8 2004/12/23 14:27:04 jlam Exp $ d39 2 a40 1 NetBSD-2.[0-9]-* NetBSD-2.[0-9]_*-* \ @ 1.8 log @Don't remove library options from the command line quite so aggressively. Allow the configure process a chance to detect on its own whether the named library exists or not by allowing those library options to pass through to the compiler on a test compile. A package that *needs* those library options to be removed can add the appropriate rm: BUILDLINK_TRANSFORM command to its package Makefile. @ text @d1 1 a1 1 # $NetBSD: dlopen.builtin.mk,v 1.7 2004/12/02 15:04:16 jlam Exp $ d20 1 a20 1 . if exists(/usr/include/dlfcn.h) @ 1.7 log @If we're using the builtin dlopen(), and libdl.* doesn't exist, then drop the "-ldl" option on the floor. This "fixes" packages that hardcode "-ldl" into the command line when linking software. @ text @d1 1 a1 1 # $NetBSD: dlopen.builtin.mk,v 1.6 2004/11/28 05:44:34 jlam Exp $ a73 2 . else BUILDLINK_TRANSFORM+= rm:-ldl @ 1.7.2.1 log @Pullup ticket 251 - requested by Johnny C. Lam compatibility fix for dlopen.builtin.mk Revisions pulled up: - pkgsrc/mk/dlopen.builtin.mk 1.10 Module Name: pkgsrc Committed By: jlam Date: Thu Jan 20 15:22:39 UTC 2005 Modified Files: pkgsrc/mk: dlopen.builtin.mk Log Message: Also match NetBSD security releases, e.g. 2.0.1, when deciding whether using dlopen() implies linking against libpthread. Idea for fix from PR pkg/29022 and probably also fixes PR pkg/28800. @ text @d1 1 a1 1 # $NetBSD: dlopen.builtin.mk,v 1.10 2005/01/20 15:22:39 jlam Exp $ d39 1 a39 2 NetBSD-2.[0-9]_*-* \ NetBSD-2.[0-9]-* NetBSD-2.[0-9].[0-9]*-* \ @ 1.6 log @Reverse the tests so that we actually check for the existence and not the non-existence of the library -- this more accurately reflects what we want to say. @ text @d1 1 a1 1 # $NetBSD: dlopen.builtin.mk,v 1.5 2004/11/26 21:04:46 jlam Exp $ d74 2 @ 1.6.2.1 log @file dlopen.builtin.mk was added on branch tv-derecurse on 2004-11-28 20:11:32 +0000 @ text @d1 86 @ 1.6.2.2 log @Merge from HEAD. @ text @a0 86 # $NetBSD: dlopen.builtin.mk,v 1.6.2.1 2004/11/28 20:11:32 tv Exp $ .for _lib_ in dl . if !defined(_BLNK_LIB_FOUND.${_lib_}) _BLNK_LIB_FOUND.${_lib_}!= \ if ${TEST} "`${ECHO} /usr/lib/lib${_lib_}.*`" != "/usr/lib/lib${_lib_}.*"; then \ ${ECHO} "yes"; \ elif ${TEST} "`${ECHO} /lib/lib${_lib_}.*`" != "/lib/lib${_lib_}.*"; then \ ${ECHO} "yes"; \ else \ ${ECHO} "no"; \ fi BUILDLINK_VARS+= _BLNK_LIB_FOUND.${_lib_} . endif .endfor .undef _lib_ .if !defined(IS_BUILTIN.dl) IS_BUILTIN.dl= no . if exists(/usr/include/dlfcn.h) IS_BUILTIN.dl= yes . endif BUILDLINK_VARS+= IS_BUILTIN.dl .endif # IS_BUILTIN.pthread .if !defined(USE_BUILTIN.dl) USE_BUILTIN.dl= ${IS_BUILTIN.dl} . if ${OPSYS} == "Darwin" USE_BUILTIN.dl= no # Darwin uses devel/dlcompat . endif .endif # # The following platforms require pthreads to be linked into the # application if it uses dlopen() or else the applications will core # dump when they dlopen a shared module that _is_ linked with pthread # support. # _DLOPEN_REQUIRE_PTHREAD_PLATFORMS= \ NetBSD-2.[0-9]-* NetBSD-2.[0-9]_*-* \ NetBSD-2.[0-8][0-9]*-* NetBSD-2.9[0-8]*-* \ NetBSD-2.99.[0-9]-* NetBSD-2.99.10-* _DLOPEN_REQUIRE_PTHREADS?= no .for _pattern_ in ${_DLOPEN_REQUIRE_PTHREAD_PLATFORMS} . if !empty(MACHINE_PLATFORM:M${_pattern_}) . if !empty(PREFER_NATIVE_PTHREADS:M[yY][eE][sS]) _DLOPEN_REQUIRE_PTHREADS= yes . endif . endif .endfor # # DLOPEN_REQUIRE_PTHREADS is a user- and package-settable yes/no variable # whose value decides whether pthread.buildlink3.mk is automatically # included or not. Its default value depends on whether native # pthreads exist. # .if defined(DLOPEN_REQUIRE_PTHREADS) _DLOPEN_REQUIRE_PTHREADS:= ${DLOPEN_REQUIRE_PTHREADS} .else DLOPEN_REQUIRE_PTHREADS= ${_DLOPEN_REQUIRE_PTHREADS} .endif CHECK_BUILTIN.dl?= no .if !empty(CHECK_BUILTIN.dl:M[nN][oO]) . if !empty(USE_BUILTIN.dl:M[yY][eE][sS]) BUILDLINK_PREFIX.dl= /usr . if !empty(_BLNK_LIB_FOUND.dl:M[yY][eE][sS]) # # No need to add this to BUILDLINK_LIBS.dl since most GNU configure # scripts already check for -ldl themselves. # BUILDLINK_LDADD.dl= -ldl . endif . if !empty(_DLOPEN_REQUIRE_PTHREADS:M[yY][eE][sS]) BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+ . include "../../mk/pthread.buildlink3.mk" BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:S/+$//} . include "../../mk/pthread.builtin.mk" BUILDLINK_CFLAGS.dl+= ${PTHREAD_CFLAGS} BUILDLINK_LDFLAGS.dl+= ${PTHREAD_LDFLAGS} BUILDLINK_LIBS.dl+= ${PTHREAD_LIBS} . endif . endif # USE_BUILTIN.dl == yes .endif # CHECK_BUILTIN.dl @ 1.6.2.3 log @sync with HEAD @ text @d1 1 a1 1 # $NetBSD: dlopen.builtin.mk,v 1.6.2.2 2004/12/03 19:15:00 tv Exp $ a73 2 . else BUILDLINK_TRANSFORM+= rm:-ldl @ 1.6.2.4 log @sync with HEAD @ text @d1 1 a1 1 # $NetBSD: dlopen.builtin.mk,v 1.6.2.3 2004/12/31 20:25:30 tv Exp $ d74 2 @ 1.6.2.5 log @sync with HEAD @ text @d1 1 a1 1 # $NetBSD: dlopen.builtin.mk,v 1.6.2.4 2005/01/10 16:15:25 tv Exp $ d20 1 a20 1 . if exists(/usr/include/dlfcn.h) || exists(/opt/gcc.3.3/include/dlfcn.h) @ 1.6.2.6 log @sync with HEAD @ text @d1 1 a1 1 # $NetBSD: dlopen.builtin.mk,v 1.6.2.5 2005/01/24 18:40:01 tv Exp $ d39 1 a39 2 NetBSD-2.[0-9]_*-* \ NetBSD-2.[0-9]-* NetBSD-2.[0-9].[0-9]*-* \ @ 1.6.2.7 log @EOL the tv-derecurse branch; it has become too outdated. The last live revision can be fetched at the tv-derecurse-eol tag. @ text @d1 87 @ 1.5 log @Match NetBSD-2.x_RCn as well as NetBSD-2.x. @ text @d1 1 a1 1 # $NetBSD: dlopen.builtin.mk,v 1.4 2004/11/26 17:42:42 jlam Exp $ d6 5 a10 1 if ${TEST} "`${ECHO} /usr/lib/lib${_lib_}.*`" = "/usr/lib/lib${_lib_}.*"; then \ a11 4 elif ${TEST} "`${ECHO} /lib/lib${_lib_}.*`" = "/lib/lib${_lib_}.*"; then \ ${ECHO} "no"; \ else \ ${ECHO} "yes"; \ @ 1.4 log @Move the section that defines DLOPEN_REQUIRE_PTHREAD outside of the CHECK_BUILTIN.dl-protected section so that it's value can be usd after dlopen.buildlink3.mk is included. This should fix PR pkg/28422. @ text @d1 1 a1 1 # $NetBSD: dlopen.builtin.mk,v 1.3 2004/11/26 08:26:51 jlam Exp $ d39 2 a40 1 NetBSD-2.[0-9]-* NetBSD-2.[0-8][0-9]*-* NetBSD-2.9[0-8]*-* \ @ 1.3 log @Don't auto-add -ldl to LIBS since most GNU configure scripts already check for this condition. @ text @d1 1 a1 1 # $NetBSD: dlopen.builtin.mk,v 1.2 2004/11/26 08:15:25 jlam Exp $ a31 13 CHECK_BUILTIN.dl?= no .if !empty(CHECK_BUILTIN.dl:M[nN][oO]) . if !empty(USE_BUILTIN.dl:M[yY][eE][sS]) BUILDLINK_PREFIX.dl= /usr . if !empty(_BLNK_LIB_FOUND.dl:M[yY][eE][sS]) # # No need to add this to BUILDLINK_LIBS.dl since most GNU configure # scripts already check for -ldl themselves. # BUILDLINK_LDADD.dl= -ldl . endif d43 3 a45 3 . for _pattern_ in ${_DLOPEN_REQUIRE_PTHREAD_PLATFORMS} . if !empty(MACHINE_PLATFORM:M${_pattern_}) . if !empty(PREFER_NATIVE_PTHREADS:M[yY][eE][sS]) d47 3 a49 3 . endif . endif . endfor d56 1 a56 1 . if defined(DLOPEN_REQUIRE_PTHREADS) d58 1 a58 1 . else d60 13 @ 1.2 log @Move all dlopen-handling code into dlopen.{builtin,buildlink3}.mk. @ text @d1 1 a1 1 # $NetBSD: dlopen.builtin.mk,v 1.1 2004/11/26 07:05:19 jlam Exp $ d39 5 a43 1 BUILDLINK_LIBS.dl= -ldl @ 1.1 log @Split dlopen.buildlink3.mk into two files: dlopen.buildlink3.mk, which is included by packages that use dlopen(), and dlopen.builtin.mk, which checks for the presence of built-in dl*() functions. On Darwin, including dlopen.buildlink3.mk will cause the devel/dlcompat package to be used if the base system lacks a dlcompat library. @ text @d1 1 a1 1 # $NetBSD$ a64 2 # Including pthread.buildlink3.mk is deferred until bsd.pkg.mk. # d71 4 @