diff options
author | wiz <wiz@pkgsrc.org> | 2014-12-30 15:13:19 +0000 |
---|---|---|
committer | wiz <wiz@pkgsrc.org> | 2014-12-30 15:13:19 +0000 |
commit | c847f599fae4c8f3ee0a5d8469a7564bab932fc0 (patch) | |
tree | 72a940b4201682de30eda8c9b0e307555f4681b7 /mk/buildlink3 | |
parent | 48b9f0ffaecb6a61d5a3d0b56da4a0e13bf291c3 (diff) | |
download | pkgsrc-c847f599fae4c8f3ee0a5d8469a7564bab932fc0.tar.gz |
Remove pkg_views support, second part: infrastructure.
Diffstat (limited to 'mk/buildlink3')
-rw-r--r-- | mk/buildlink3/BUILDLINK3_DG | 15 | ||||
-rw-r--r-- | mk/buildlink3/PKGVIEWS_UG | 222 | ||||
-rw-r--r-- | mk/buildlink3/README | 140 | ||||
-rw-r--r-- | mk/buildlink3/TODO | 51 | ||||
-rw-r--r-- | mk/buildlink3/bsd.buildlink3.mk | 112 | ||||
-rw-r--r-- | mk/buildlink3/libtool-fix-la | 33 |
6 files changed, 23 insertions, 550 deletions
diff --git a/mk/buildlink3/BUILDLINK3_DG b/mk/buildlink3/BUILDLINK3_DG index 6f7f4d05d4d..342afdd7e1d 100644 --- a/mk/buildlink3/BUILDLINK3_DG +++ b/mk/buildlink3/BUILDLINK3_DG @@ -1,4 +1,4 @@ -$NetBSD: BUILDLINK3_DG,v 1.7 2005/03/24 17:46:01 tv Exp $ +$NetBSD: BUILDLINK3_DG,v 1.8 2014/12/30 15:13:19 wiz Exp $ 0 Developer's guide to buildlink3 ================================= @@ -43,19 +43,6 @@ packages that want to add a dependency must directly include the buildlink3.mk file for that dependency. - 1.3 Support for pkgviews - ======================== - -When building pkgviews packages, buildlink3 doesn't symlink files -into ${BUILDLINK_DIR} since it can safely refer to only a specific -package's files by passing the appropriate -I<dir> and -L<dir> flags -to the compiler, where <dir> points to a location in the package's -depot directory. When building "overwrite" packages, buildlink3 will -act and feel very much like buildlink2 but with more advanced wrapper -scripts, and there are provisions for allowing an "overwrite" package -to build against the viewed instance of a depoted package. - - 2 Troubleshooting ================= diff --git a/mk/buildlink3/PKGVIEWS_UG b/mk/buildlink3/PKGVIEWS_UG deleted file mode 100644 index 703e9c54078..00000000000 --- a/mk/buildlink3/PKGVIEWS_UG +++ /dev/null @@ -1,222 +0,0 @@ -$NetBSD: PKGVIEWS_UG,v 1.4 2007/10/07 12:59:13 kano Exp $ - - 0 User's Guide to pkgviews - ========================== - -This is a tutorial for pkgsrc users who wish to experiment with the -new "pkgviews" implementation in pkgsrc. More information about -pkgviews may be found in pkgsrc/mk/buildlink3/README. That document -also explains why you might want to use pkgviews. Some reasons -include: - - * fully dynamic PLISTs - * multiple version of the same package can co-exist - * no or non-fatal conflicting packages - - - 0.1 CAVEAT (USE AT YOUR OWN RISK!) - ================================== - -Pkgviews is *completely experimental* at this point in time. Bug -reports on pkgviews will be treated with a fairly low priority by the -general pkgsrc developers, though I may personally be more responsive. -However, the major thrust of the next several weeks of pkgsrc -development for me will revolve around testing and integrating the -buildlink3 framework into pkgsrc and deprecating buildlink2. Any -work on pkgviews during that time is strictly happenstance. - - - 0.1 Preparing your system to use pkgviews - ========================================= - -You will need to start with a clean system to use pkgviews. Depoted -packages, a.k.a "pkgviews" packages (packages that are built using -pkgviews) cannot depend on non-depoted packages, a.k.a. "overwrite" -packages, although the reverse is possible. If you have _any_ -packages installed, you will need to pkg_delete them before you can -start building depoted packages. In fact, it's best to completely -nuke /usr/pkg (or wherever you choose for your ${LOCALBASE}) as -pkgviews manages all of its own directories. - -Next you will need to add the following line to /etc/mk.conf: - - PKG_INSTALLATION_PREFS= pkgviews overwrite - -This creates pkgviews packages instead of overwrite packages for any -packages that support it. The packages that do support pkgviews -can be identified by searching the package Makefile for the -following line: - - PKG_INSTALLATION_TYPES= overwrite pkgviews - - - 0.2 Installing your first pkgviews package - ========================================== - -The first package you will need to install is pkgsrc/pkgtools/digest. - -===> Checking for vulnerabilities in digest-20021220 -===> Extracting for digest-20021220 -===> Checking for vulnerabilities in digest-20021220 -===> Patching for digest-20021220 -===> Overriding tools for digest-20021220 -===> Buildlinking for digest-20021220 -===> Configuring for digest-20021220 -configure: WARNING: If you wanted to set the --build type, don't use --host. - If a cross compiler is detected then cross compile mode will be used. -checking build system type... i386-unknown-netbsdelf1.6.2. -checking host system type... i386--netbsdelf -... -configure: creating ./config.status -config.status: creating Makefile -config.status: creating config.h -===> Building for digest-20021220 -cc -DHAVE_CONFIG_H -I. -I. -DHOST=\"i386--netbsdelf\" -DVERSION=\"20021220\" -O2 -mcpu=pentiumpro -c bits.c -o bits.o -... -cc -O2 -mcpu=pentiumpro -o digest digest.o md5c.o rmd160.o rmd160hl.o sha2.o sha2hl.o md5hl.o sha1.o sha1hl.o -=> Fixing buildlink references in files-to-be-installed. -===> Installing for digest-20021220 -===> Becoming root@blossom.hq.williamlam.com to install digest. -sudo /bin/sh ./mkinstalldirs /usr/pkg/packages/digest-20021220/bin -mkdir /usr/pkg/packages/digest-20021220/bin -install -c -s -o root -g wheel -m 555 digest /usr/pkg/packages/digest-20021220/bin/digest -/bin/sh ./mkinstalldirs /usr/pkg/packages/digest-20021220/man/man1 -mkdir /usr/pkg/packages/digest-20021220/man -mkdir /usr/pkg/packages/digest-20021220/man/man1 -install -c -o root -g wheel -m 444 digest.1 /usr/pkg/packages/digest-20021220/man/man1/digest.1 -===> Registering installation for digest-20021220 -===> Building views for digest-20021220 -=> Performing package view clash check for digest-20021220 in standard view -=> Performing package view overwrite check for digest-20021220 in standard view -=> Linking package into standard view - -Notice in the transcript that the digest package has been installed -into /usr/pkg/packages/digest-20021220 and then subsequently linked -into the "standard view". The standard view is simply /usr/pkg, which -means that the digest executable is accessible as /usr/pkg/bin/digest. - - - 0.3 The contents of /usr/pkg (${LOCALBASE}) - =========================================== - -There is a directory /usr/pkg/packages that contains all of the -depoted packages. The contents of /usr/pkg/packages after installing -digest are: - -/usr/pkg/packages/digest-20021220/+BUILD_INFO -/usr/pkg/packages/digest-20021220/+BUILD_VERSION -/usr/pkg/packages/digest-20021220/+COMMENT -/usr/pkg/packages/digest-20021220/+CONTENTS -/usr/pkg/packages/digest-20021220/+DESC -/usr/pkg/packages/digest-20021220/+SIZE_ALL -/usr/pkg/packages/digest-20021220/+SIZE_PKG -/usr/pkg/packages/digest-20021220/+VIEWS -/usr/pkg/packages/digest-20021220/bin/digest -/usr/pkg/packages/digest-20021220/man/man1/digest.1 - -Note that all of the files related to the package, including the -package metadata files used by the pkg_* tools, are stored in the -"depot directory" for digest (/usr/pkg/packages/digest-20021220). - -The digest package was also linked into the standard view. Looking -inside /usr/pkg shows us the following symlinks: - -/usr/pkg/bin/digest -> /usr/pkg/packages/digest-20021220/bin/digest -/usr/pkg/man/man1/digest.1 -> /usr/pkg/packages/digest-20021220/man/man1/digest.1 - -Since digest is present in /usr/pkg/bin, it can be used as always -without any changes needed by the typical user with /usr/pkg/bin in -his PATH, and "man digest" will continue to work as expected. - - - 0.4 Creating new views - ====================== - -The following commands will install both pkgsrc/www/lynx and -pkgsrc/www/lynx-current onto the same system using pkgviews: - - cd /usr/pkgsrc/www/lynx; make install - cd /usr/pkgsrc/www/lynx-current; make install PKGVIEWS=devel - -The stable version of lynx (2.8.4.1nb2) is linked into the standard -view, while the -current version of lynx (2.8.5.0.7nb3) is linked into -the "devel" view. The lynx-related files in /usr/pkg are: - -/usr/pkg/bin/lynx -> /usr/pkg/packages/lynx-2.8.4.1nb2/bin/lynx -/usr/pkg/man/man1/lynx.1 -> /usr/pkg/packages/lynx-2.8.4.1nb2/man/man1/lynx.1 -/usr/pkg/share/locale/cs/LC_MESSAGES/lynx.mo -> ... -... - -/usr/pkg/devel/bin/lynx -> /usr/pkg/packages/lynx-2.8.5.0.7nb3/bin/lynx -/usr/pkg/devel/man/man1/lynx.1 -> /usr/pkg/packages/lynx-2.8.5.0.7nb3/man/man1/lynx.1 -/usr/pkg/devel/share/locale/cs/LC_MESSAGES/lynx.mo -> ... -... - -Note that the files for pkgsrc/www/lynx have been symlinked into -/usr/pkg as usual, but the files for pkgsrc/www/lynx-current have been -symlinked into the "devel" subdirectory of /usr/pkg. The files in -in the "devel" view can be accessed by adding /usr/pkg/devel/bin to -the PATH and adding /usr/pkg/devel/man to MANPATH in the appropriate -place. - - - 0.5 Managing views using pkg_* tools - ==================================== - -Adding and removing package instances to and from views is always a -safe operation as the true package files are left untouched. All that -happens is that linkfarms are being added or removed, thus changes are -always easy to reverse. - -Adding a depoted package into a view may be accomplished with: - - pkg_view -w devel add gmake-3.80nb2 - -This adds the gmake-3.80nb2 package (already present on the system) to -the "devel" view. The "devel" view is created if it doesn't already -exist. - -Removing a package from a view may be accomplished with either of the -following commands: - - pkg_view -w devel delete gmake-3.80nb2 - pkg_delete -K /usr/pkg/devel/.pkgdb gmake - -Either of these will remove the gmake-3.80nb2 package from the "devel" -view if the package exists in the view. - -Removing a package from the standard view may be accomplished with -either of the following commands - - pkg_view delete gmake-3.80nb2 - pkg_delete gmake - -The latter one is recommended for speed. - - - 0.6 Completely removing a package - ================================= - -Removing a depoted package from the system (removing it from all views -and removing the depot directory) is done with: - - pkg_delete -K /usr/pkg/packages gmake-3.80nb2 - -If you know that only a single gmake is present on your system, then -you can specify "gmake" instead of the full package name to -pkg_delete(1). However, I recommend being explicit about the package -you are removing to avoid any surprises. - - - 0.6 Where to learn more about pkgviews - ====================================== - -There are several shell environment variables that may be set to -affect the default behaviour of the pkg_* tools. Please read the -pkg_view(1) man page for more information. - -For a more complete understanding of the motivations and principles -behind pkgviews, the following paper by Alistair Crooks is highly -recommended: - - http://www.NetBSD.org/docs/software/pkgviews.pdf diff --git a/mk/buildlink3/README b/mk/buildlink3/README deleted file mode 100644 index e0215e438ec..00000000000 --- a/mk/buildlink3/README +++ /dev/null @@ -1,140 +0,0 @@ -$NetBSD: README,v 1.7 2007/10/07 12:59:13 kano Exp $ - - 0 Package Views - =============== - -Package views is a pkgsrc technology that supports building and -installing multiple versions of the same software such that they -co-exist on a single system. Individual packages are installed into -their own directory tree and their files are symlinked into "views". -Users can choose amongst different software collections provided by -different views by appropriately setting shell environment variables, -e.g., PATH, MANPATH, etc. - -Package views is similar in spirit to the Encap Package Management -System, the GNU Stow Project, and the Carnegie Mellon University Depot -Configuration Management system: - - http://www.encap.org/ - http://www.gnu.org/software/stow/stow.html - http://asg.web.cmu.edu/andrew2/depot/ - -However, these projects have a philosophy of "install anywhere, use in -one place", whereas package views departs from that model with a -philosophy that can roughly be summarized as "install in one place, -use anywhere". - - - 0.1 A short history of package views - ==================================== - -Package views was proposed as a solution to the problem of not being -able to install multiple versions of the same software simultaneously -via pkgsrc. Alistair Crooks presented a paper on package views at -EuroBSDCon in November 2002 that described the work he did on the -"pkgviews" branch of pkgsrc where he implemented his ideas. The paper -is highly-recommended reading for a more complete understanding of -package views principles and is available at: - - http://www.NetBSD.org/docs/software/pkgviews.pdf - -Unfortunately, Alistair ran out of time to devote to integrating his -work into the main pkgsrc branch. The code he developed languished on -the "pkgviews" branch for over a year, and in the meantime much code -was added to pkgsrc that increased the complexity and the capabilities -of pkgsrc, including buildlink2, which conflicted with Alistair's -implementation of package views. In September 2003, Johnny Lam -integrated the functionality on the pkgviews branch into modern -pkgsrc. As part of the integration, a new buildlink3 framework was -created so that the ability to isolate builds from differences in -the environment wouldn't be lost. - - - 0.2 Package views terminology - ============================= - -The terminology for packages in the package views world is as -follows: a "pkgviews" package is a package that has been converted to -build and install using package views. An "overwrite" package is one -that hasn't. A "depoted" package describes a pkgviews package -installed into /usr/pkg/packages in its "depot" directory. A package -"instance" in a view describes a depoted package symlinked into a -view. - - - 0.3 What's been done - ==================== - -The pkg_install tools have been enhanced to handle both binary depoted -packages and binary "overwrite" packages. The pkgsrc internals have -been modified to allow building and installing depoted packages and to -automatically add a depoted package in the default view. -"Overwrite" packages shouldn't be affected by the changes, and can be -freely mixed with pkgviews packages. - -Packages that have been converted to use "pkgviews" should add the -following line to their Makefiles: - - PKG_INSTALLATION_TYPES= overwrite pkgviews - -PKG_INSTALLATION_TYPES can also just be one value or the other to -explicitly note that the package only supports that one type of -installation style. Users may add the following line to /etc/mk.conf: - - PKG_INSTALLATION_PREFS= pkgviews overwrite - -to note that they prefer building using pkgviews if the package -supports it, otherwise to build using the "overwrite" installation -style. However, users should not change PKG_INSTALLATION_PREFS from -the default value unless they're sure that they want to start -migrating their package system over to using pkgviews. The default, -"overwrite pkgviews", will cause all packages to build using the -"overwrite" installation style. - -Some highlight of pkgviews packages include: - - * fully dynamic PLISTs - * multiple versions of the same package can co-exist - - - 0.4 buildlink3 pkgsrc build framework - ===================================== - -A new buildlink3 framework that takes advantage of depoted packages -has been added to pkgsrc as part of the package views changes. -Buildlink3 uses wrapper scripts much like buildlink2. However, when -building pkgviews packages, it doesn't symlink files into -${BUILDLINK_DIR} since it can safely refer to only a specific -package's files by passing the appropriate -I<dir> and -L<dir> flags -to the compiler, where <dir> points to a location in the package's -depot directory. When building "overwrite" packages, buildlink3 will -act and feel very much like buildlink2 but with more advanced wrapper -scripts, and there are provisions for allowing an "overwrite" package -to build against the viewed instance of a depoted package. The -implementation currently allows "overwrite" to depend on either -"overwrite" or pkgviews packages, but pkgviews packages are restricted -to only being able to depend on other pkgviews packages. - - - 0.5 Future Work - =============== - -There may be some way around the problem of pkgviews packages not -being able to depend on "overwrite" packages. That's the only thing -standing in the way between allowing an arbitrary package to be built -using either installation style and working seamlessly with any other -package. The problem has to do with proper handling of metadata in -the +REQUIRED_BY and +CONTENTS files that are split in two separate -places. One possible route to a solution is that for each overwrite -package, we can symlink /usr/pkg/packages/<pkg> -> /var/db/pkg/<pkg>. -This allows depoted packages to record themselves directly in the -+REQUIRED_BY files of "overwrite" packages. If a user happens to run - - pkg_delete -K /usr/pkg/packages <overwrite_pkg> - -then it still uses the correct +CONTENTS, +INSTALL, and +DEINSTALL -scripts, so the package will still remove itself properly from -/usr/pkg. However, there are some remaining issues with properly -removing both the /var/db/pkg/<pkg> directory and the -/usr/pkg/packages/<pkg> symlink, so the deletion won't be completely -clean until this issue can be resolved. diff --git a/mk/buildlink3/TODO b/mk/buildlink3/TODO deleted file mode 100644 index 3d05c4f5b15..00000000000 --- a/mk/buildlink3/TODO +++ /dev/null @@ -1,51 +0,0 @@ -$NetBSD: TODO,v 1.5 2004/02/17 08:59:44 jlam Exp $ - -TODO items -========== - -* Make the error where pkgviews packages depend on overwrite packages - less obfuscated. -* Teach linkfarm to do tree-folding a la GNU stow. -* Correct handling of pkgconfig *.pc files. - -Package views integration plan: -============================== - -(1) Modify pkgsrc internals (bsd.pkg.mk & friends) to build and - install depoted packages if PKG_INSTALLATION_TYPE is set to - "pkgviews" in the package Makefile, and to add the depoted - package to the default view. The depoted package will include - all of its metadata files in the depot directory, and we rely - on pkg_view to copy the metadata files into /var/db/pkg as - part of adding the package to the default view. We only - support the default view. Depoted packages will install into - ${LOCALBASE}/packages and the default view will be through - ${LOCALBASE} for all packages. - -Using this infrastructure, depoted packages that have been added to -the default view should look and feel like a non-depoted package in -all respects, down to what you find in /var/db/pkg/${PKGNAME}, so -non-depoted packages can depend on depoted packages without change. - -(2) Migrate non-USE_X11BASE and non-USE_IMAKE packages to set - PKG_INSTALLATION_TYPE to "pkgviews". Depoted packages can only - depend on other depoted packages. A depoted package will have - <deppkg_dir>/lib and ${LOCALBASE}/lib in the run-time library - search path (-Wl,-R*) so that wildcard dependencies on library - packages will still work (so long as the major number of the shlib - hasn't increased). - -At this point, all packages in pkgsrc except for those that define -USE_X11BASE or USE_IMAKE will be depoted. - -(3) Make xpkgwedge the default for pkgsrc. It would be nice to - enhance xpkgwedge in some way so that a package could be compiled - with the correct defaults for finding app-defaults files without - having the user fiddle with environment variables. - -This is a flag day change and will require bumping the PKGREVISIONs -for every single USE_X11BASE and USE_IMAKE package and all packages -that depend on them. - -(4) Migrate the USE_X11BASE and USE_IMAKE packages to set - PKG_INSTALLATION_TYPE to "pkgviews". diff --git a/mk/buildlink3/bsd.buildlink3.mk b/mk/buildlink3/bsd.buildlink3.mk index 5486f0dd54d..5d5992f424b 100644 --- a/mk/buildlink3/bsd.buildlink3.mk +++ b/mk/buildlink3/bsd.buildlink3.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.buildlink3.mk,v 1.231 2014/11/25 19:01:02 joerg Exp $ +# $NetBSD: bsd.buildlink3.mk,v 1.232 2014/12/30 15:13:19 wiz Exp $ # # Copyright (c) 2004 The NetBSD Foundation, Inc. # All rights reserved. @@ -205,7 +205,7 @@ _VARGROUPS+= bl3 _SYS_VARS.bl3+= BUILDLINK_${v} .endfor .for p in ${_BUILDLINK_TREE} -. for v in AUTO_VARS BUILTIN_MK CONTENTS_FILTER CPPFLAGS DEPMETHOD FILES_CMD INCDIRS IS_DEPOT LDFLAGS LIBDIRS PKGNAME PREFIX RPATHDIRS +. for v in AUTO_VARS BUILTIN_MK CONTENTS_FILTER CPPFLAGS DEPMETHOD FILES_CMD INCDIRS LDFLAGS LIBDIRS PKGNAME PREFIX RPATHDIRS _SYS_VARS.bl3+= BUILDLINK_${v}.${p} . endfor . for v in IGNORE_PKG USE_BUILTIN @@ -290,9 +290,6 @@ ${_depmethod_}+= ${_BLNK_ADD_TO.${_depmethod_}} # # BUILDLINK_PKGNAME.<pkg> the name of the package # -# BUILDLINK_IS_DEPOT.<pkg> "yes" or "no" for whether <pkg> is a -# depoted package. -# # BUILDLINK_PREFIX.<pkg> contains all of the installed files # for <pkg> # @@ -335,7 +332,6 @@ USE_BUILTIN.${_pkg_}?= no _BLNK_PKG_DBDIR.${_pkg_}?= _BLNK_PKG_DBDIR.${_pkg_}_not_found _BLNK_PKG_INFO.${_pkg_}?= ${TRUE} BUILDLINK_PKGNAME.${_pkg_}?= ${_pkg_} -BUILDLINK_IS_DEPOT.${_pkg_}?= no # Usual systems has builtin packages in /usr . if exists(/usr) BUILDLINK_PREFIX.${_pkg_}?= /usr @@ -365,9 +361,6 @@ _BLNK_PKG_DBDIR.${_pkg_}!= \ case "$$pkg" in \ "") dir="_BLNK_PKG_DBDIR.${_pkg_}_not_found" ;; \ *) dir="${_PKG_DBDIR}/$$pkg"; \ - if [ -f $$dir/+DEPOT ]; then \ - dir=`${HEAD} -1 $$dir/+DEPOT`; \ - fi ;; \ esac; \ ${ECHO} $$dir . endif @@ -384,26 +377,17 @@ _BLNK_PKG_INFO.${_pkg_}?= ${PKG_INFO_CMD} -K ${_PKG_DBDIR} . endif BUILDLINK_PKGNAME.${_pkg_}?= ${_BLNK_PKG_DBDIR.${_pkg_}:T} -. if exists(${_BLNK_PKG_DBDIR.${_pkg_}}/+VIEWS) -BUILDLINK_IS_DEPOT.${_pkg_}?= yes -. else -BUILDLINK_IS_DEPOT.${_pkg_}?= no -. endif # # Set BUILDLINK_PREFIX.<pkg> to the "PREFIX" value for the package. # . if !defined(BUILDLINK_PREFIX.${_pkg_}) -. if !empty(BUILDLINK_IS_DEPOT.${_pkg_}:M[yY][eE][sS]) -BUILDLINK_PREFIX.${_pkg_}= ${_BLNK_PKG_DBDIR.${_pkg_}} -. else -. if empty(BUILDLINK_PKGNAME.${_pkg_}:M*not_found) +. if empty(BUILDLINK_PKGNAME.${_pkg_}:M*not_found) BUILDLINK_PREFIX.${_pkg_}!= \ ${TRUE} Computing BUILDLINK_PREFIX.${_pkg_:Q}; \ ${_BLNK_PKG_INFO.${_pkg_}} -qp ${BUILDLINK_PKGNAME.${_pkg_}} | \ ${SED} -e "s,^[^/]*,,;q" -. else +. else BUILDLINK_PREFIX.${_pkg_}= BUILDLINK_PREFIX.${_pkg_}_not_found -. endif . endif . endif . if empty(BUILDLINK_PREFIX.${_pkg_}:M*not_found) @@ -497,15 +481,6 @@ BUILDLINK_LDFLAGS+= ${COMPILER_RPATH_FLAG}${_dir_} . endif .endfor # -# Add the depot directory library directory for this package to the -# runtime library search path. -# -.if ${PKG_INSTALLATION_TYPE} == "pkgviews" -. if empty(BUILDLINK_LDFLAGS:M${COMPILER_RPATH_FLAG}${PREFIX}/lib) -BUILDLINK_LDFLAGS+= ${COMPILER_RPATH_FLAG}${PREFIX}/lib -. endif -.endif -# # Add the default view library directories to the runtime library search # path so that wildcard dependencies on library packages can always be # fulfilled through the default view. @@ -615,11 +590,9 @@ buildlink-directories: # # BUILDLINK_CONTENTS_FILTER.<pkg> # filter command that filters +CONTENTS input into a list of files -# relative to ${BUILDLINK_PREFIX.<pkg>} on stdout. By default for -# overwrite packages, BUILDLINK_CONTENTS_FILTER.<pkg> outputs the -# contents of the include and lib directories in the package -# +CONTENTS, and for pkgviews packages, it outputs any libtool -# archives in lib directories. +# relative to ${BUILDLINK_PREFIX.<pkg>} on stdout. By default, +# BUILDLINK_CONTENTS_FILTER.<pkg> outputs the contents of the include +# and lib directories in the package +CONTENTS. # # BUILDLINK_FNAME_TRANSFORM.<pkg> # sed arguments used to transform the name of the source filename @@ -646,14 +619,8 @@ buildlink-${_pkg_}-cookie: ${RUN} \ ${TOUCH} ${TOUCH_FLAGS} ${_BLNK_COOKIE.${_pkg_}} -. if (${PKG_INSTALLATION_TYPE} == "pkgviews") && \ - !empty(BUILDLINK_IS_DEPOT.${_pkg_}:M[yY][eE][sS]) -BUILDLINK_CONTENTS_FILTER.${_pkg_}?= \ - ${EGREP} 'lib(/pkgconfig/.*\.pc$$|.*/lib[^/]*\.la$$)' -. else BUILDLINK_CONTENTS_FILTER.${_pkg_}?= \ ${EGREP} '(include.*/|\.h$$|\.idl$$|\.pc$$|/lib[^/]*\.[^/]*$$)' -. endif # XXX: Why not pkg_info -qL? BUILDLINK_FILES_CMD.${_pkg_}?= \ ${_BLNK_PKG_INFO.${_pkg_}} -f ${BUILDLINK_PKGNAME.${_pkg_}} | \ @@ -742,9 +709,7 @@ _BLNK_LT_ARCHIVE_FILTER_SED_SCRIPT.${_pkg_}= # empty # _BLNK_LT_ARCHIVE_FILTER_SED_SCRIPT.${_pkg_}+= \ -e "/^dependency_libs=/s,\([${_BLNK_SEP}]\)/usr\(/lib${LIBABISUFFIX}/[^${_BLNK_SEP}]*lib[^/${_BLNK_SEP}]*\.la[${_BLNK_SEP}]\),\\1${_BLNK_MANGLE_DIR.${BUILDLINK_DIR}}\\2,g" \ - -e "/^dependency_libs=/s,\([${_BLNK_SEP}]\)/usr\(/lib${LIBABISUFFIX}/[^${_BLNK_SEP}]*lib[^/${_BLNK_SEP}]*\.la[${_BLNK_SEP}]\),\\1${_BLNK_MANGLE_DIR.${BUILDLINK_DIR}}\\2,g" \ - -e "/^dependency_libs=/s,\([${_BLNK_SEP}]\)${DEPOTBASE}/[^/${_BLNK_SEP}]*\(/[^${_BLNK_SEP}]*lib[^/${_BLNK_SEP}]*\.la[${_BLNK_SEP}]\),\\1${_BLNK_MANGLE_DIR.${BUILDLINK_DIR}}\\2,g" \ - -e "/^dependency_libs=/s,\([${_BLNK_SEP}]\)${DEPOTBASE}/[^/${_BLNK_SEP}]*\(/[^${_BLNK_SEP}]*lib[^/${_BLNK_SEP}]*\.la[${_BLNK_SEP}]\),\\1${_BLNK_MANGLE_DIR.${BUILDLINK_DIR}}\\2,g" + -e "/^dependency_libs=/s,\([${_BLNK_SEP}]\)/usr\(/lib${LIBABISUFFIX}/[^${_BLNK_SEP}]*lib[^/${_BLNK_SEP}]*\.la[${_BLNK_SEP}]\),\\1${_BLNK_MANGLE_DIR.${BUILDLINK_DIR}}\\2,g" .if ${X11_TYPE} != "modular" && ${X11BASE} != "/usr" _BLNK_LT_ARCHIVE_FILTER_SED_SCRIPT.${_pkg_}+= \ @@ -798,19 +763,15 @@ _BLNK_LT_ARCHIVE_FILTER_SED_SCRIPT.${_pkg_}+= \ # This prevents libtool from looking into the original directory # for other *.la files. # -. if (${PKG_INSTALLATION_TYPE} == "overwrite") || \ - !empty(BUILDLINK_IS_DEPOT.${_pkg_}:M[nN][oO]) _BLNK_LT_ARCHIVE_FILTER_SED_SCRIPT.${_pkg_}+= \ - -e "/^libdir=/s,/usr\(/lib${LIBABISUFFIX}/[^${_BLNK_SEP}]*\),${BUILDLINK_DIR}\\1,g" \ - -e "/^libdir=/s,${DEPOTBASE}/[^/${_BLNK_SEP}]*\(/[^${_BLNK_SEP}]*\),${BUILDLINK_DIR}\\1,g" + -e "/^libdir=/s,/usr\(/lib${LIBABISUFFIX}/[^${_BLNK_SEP}]*\),${BUILDLINK_DIR}\\1,g" _BLNK_LT_ARCHIVE_FILTER_SED_SCRIPT.${_pkg_}+= \ -e "/^libdir=/s,${LOCALBASE}\(/[^${_BLNK_SEP}]*\),${BUILDLINK_DIR}\\1,g" -. if ${X11_TYPE} != "modular" && ${X11BASE} != "/usr" +. if ${X11_TYPE} != "modular" && ${X11BASE} != "/usr" _BLNK_LT_ARCHIVE_FILTER_SED_SCRIPT.${_pkg_}+= \ -e "/^libdir=/s,${X11BASE}\(/[^${_BLNK_SEP}]*\),${BUILDLINK_X11_DIR}\\1,g" -. endif . endif .endfor @@ -840,21 +801,6 @@ do-buildlink: ${_target_} _BLNK_PASSTHRU_DIRS= # empty _BLNK_PASSTHRU_RPATHDIRS= # empty # -# Allow all of the depot directories for packages whose headers and -# libraries we use. -# -.for _pkg_ in ${_BLNK_PACKAGES} -. if !empty(BUILDLINK_IS_DEPOT.${_pkg_}:M[yY][eE][sS]) -_BLNK_PASSTHRU_DIRS+= ${BUILDLINK_PREFIX.${_pkg_}} -. endif -.endfor -# -# Allow the depot directory for the package we're building. -# -.if ${PKG_INSTALLATION_TYPE} == "pkgviews" -_BLNK_PASSTHRU_DIRS+= ${PREFIX} -.endif -# # Allow any directories specified by the package or user. # _BLNK_PASSTHRU_DIRS+= ${BUILDLINK_PASSTHRU_DIRS} @@ -871,14 +817,12 @@ _BLNK_PASSTHRU_DIRS:= ${_BLNK_PASSTHRU_DIRS:N${_dir_}} # package to be in the runtime library search path. # .for _pkg_ in ${_BLNK_PACKAGES} -. if !empty(BUILDLINK_IS_DEPOT.${_pkg_}:M[nN][oO]) -. if !empty(BUILDLINK_LIBDIRS.${_pkg_}) -. for _dir_ in ${BUILDLINK_LIBDIRS.${_pkg_}} -. if exists(${BUILDLINK_PREFIX.${_pkg_}}/${_dir_}) +. if !empty(BUILDLINK_LIBDIRS.${_pkg_}) +. for _dir_ in ${BUILDLINK_LIBDIRS.${_pkg_}} +. if exists(${BUILDLINK_PREFIX.${_pkg_}}/${_dir_}) _BLNK_PASSTHRU_RPATHDIRS+= ${BUILDLINK_PREFIX.${_pkg_}}/${_dir_} -. endif -. endfor -. endif +. endif +. endfor . endif .endfor # @@ -916,9 +860,6 @@ _BLNK_MANGLE_DIRS+= ${_BLNK_PASSTHRU_DIRS} _BLNK_MANGLE_DIRS+= ${_BLNK_PASSTHRU_RPATHDIRS} _BLNK_MANGLE_DIRS+= ${COMPILER_INCLUDE_DIRS} _BLNK_MANGLE_DIRS+= ${COMPILER_LIB_DIRS} -.if ${PKG_INSTALLATION_TYPE} == "pkgviews" -_BLNK_MANGLE_DIRS+= ${PREFIX} -.endif _BLNK_MANGLE_DIRS+= ${LOCALBASE} .if defined(USE_X11) && ${X11_TYPE} != "modular" _BLNK_MANGLE_DIRS+= ${X11BASE} @@ -945,9 +886,6 @@ _BLNK_PROTECT_DIRS+= ${_BLNK_PASSTHRU_DIRS} _BLNK_UNPROTECT_DIRS+= ${COMPILER_INCLUDE_DIRS} _BLNK_UNPROTECT_DIRS+= ${COMPILER_LIB_DIRS} -.if ${PKG_INSTALLATION_TYPE} == "pkgviews" -_BLNK_UNPROTECT_DIRS+= ${PREFIX} -.endif _BLNK_UNPROTECT_DIRS+= ${LOCALBASE} .if defined(USE_X11) && ${X11_TYPE} != "modular" _BLNK_UNPROTECT_DIRS+= ${X11BASE} @@ -1055,24 +993,14 @@ _BLNK_TRANSFORM+= sub-rpath:${_dir_}:${_BLNK_MANGLE_DIR.${_dir}} _CWRAPPERS_TRANSFORM+= R:/usr/lib:/usr/lib .endfor # -# Change references to ${DEPOTBASE}/<pkg> into ${LOCALBASE} so that -# "overwrite" packages think headers and libraries for "pkgviews" packages -# are just found in the default view. -# -.if ${PKG_INSTALLATION_TYPE} == "overwrite" -_BLNK_TRANSFORM+= depot:${DEPOTBASE}:${LOCALBASE} -.endif -# # Convert direct paths to static libraries and libtool archives in # ${LOCALBASE} or ${X11BASE} into references into ${BUILDLINK_DIR}. # -.if ${PKG_INSTALLATION_TYPE} == "overwrite" _BLNK_TRANSFORM+= P:${LOCALBASE}:${_BLNK_MANGLE_DIR.${BUILDLINK_DIR}} _CWRAPPERS_TRANSFORM+= P:${X11BASE}:${BUILDLINK_X11_DIR} -. if defined(USE_X11) && ${X11_TYPE} != "modular" +.if defined(USE_X11) && ${X11_TYPE} != "modular" _BLNK_TRANSFORM+= P:${X11BASE}:${_BLNK_MANGLE_DIR.${BUILDLINK_X11_DIR}} _CWRAPPERS_TRANSFORM+= P:${LOCALBASE}:${BUILDLINK_DIR} -. endif .endif # # Transform references to ${X11BASE} into ${BUILDLINK_X11_DIR}. @@ -1088,12 +1016,10 @@ _CWRAPPERS_TRANSFORM+= L:${X11BASE}:${BUILDLINK_X11_DIR} # # Transform references to ${LOCALBASE} into ${BUILDLINK_DIR}. # -.if ${PKG_INSTALLATION_TYPE} == "overwrite" _BLNK_TRANSFORM+= I:${LOCALBASE}:${_BLNK_MANGLE_DIR.${BUILDLINK_DIR}} _BLNK_TRANSFORM+= L:${LOCALBASE}:${_BLNK_MANGLE_DIR.${BUILDLINK_DIR}} _CWRAPPERS_TRANSFORM+= I:${LOCALBASE}:${BUILDLINK_DIR} _CWRAPPERS_TRANSFORM+= L:${LOCALBASE}:${BUILDLINK_DIR} -.endif # # Transform references to ${X11BASE} into ${BUILDLINK_X11_DIR}. # (do so only after transforming references to ${LOCALBASE} if the @@ -1106,11 +1032,8 @@ _CWRAPPERS_TRANSFORM+= I:${X11BASE}:${BUILDLINK_X11_DIR} _CWRAPPERS_TRANSFORM+= L:${X11BASE}:${BUILDLINK_X11_DIR} .endif # -# Protect any remaining references to ${PREFIX}, ${LOCALBASE}, or ${X11BASE}. +# Protect any remaining references to ${LOCALBASE}, or ${X11BASE}. # -.if ${PKG_INSTALLATION_TYPE} == "pkgviews" -_BLNK_TRANSFORM+= untransform:sub-mangle:${PREFIX}:${_BLNK_MANGLE_DIR.${PREFIX}} -.endif _BLNK_TRANSFORM+= untransform:sub-mangle:${LOCALBASE}:${_BLNK_MANGLE_DIR.${LOCALBASE}} .if defined(USE_X11) && ${X11_TYPE} != "modular" _BLNK_TRANSFORM+= untransform:sub-mangle:${X11BASE}:${_BLNK_MANGLE_DIR.${X11BASE}} @@ -1203,7 +1126,6 @@ ${WRAPPER_TMPDIR}/libtool-fix-la: ${BUILDLINK_SRCDIR}/libtool-fix-la ${RUN}${CAT} ${.ALLSRC} \ | ${SED} -e "s|@_BLNK_WRAP_LT_UNTRANSFORM_SED@|"${_BLNK_WRAP_LT_UNTRANSFORM_SED:Q}"|g" \ -e "s|@BUILDLINK_DIR@|${BUILDLINK_DIR}|g" \ - -e "s|@DEPOTBASE@|${DEPOTBASE}|g" \ -e "s|@LOCALBASE@|${LOCALBASE}|g" \ -e "s|@WRKSRC@|${WRKSRC}|g" \ -e "s|@BASENAME@|"${BASENAME:Q}"|g" \ diff --git a/mk/buildlink3/libtool-fix-la b/mk/buildlink3/libtool-fix-la index ac6f00ebc16..83c55823e00 100644 --- a/mk/buildlink3/libtool-fix-la +++ b/mk/buildlink3/libtool-fix-la @@ -1,4 +1,4 @@ -# $NetBSD: libtool-fix-la,v 1.8 2006/11/09 02:07:59 rillig Exp $ +# $NetBSD: libtool-fix-la,v 1.9 2014/12/30 15:13:19 wiz Exp $ # # Copyright (c) 2004 The NetBSD Foundation, Inc. # All rights reserved. @@ -46,13 +46,9 @@ # For the *.lai files, in the "dependency_libs" line, we remove # redundant -Ldir and -llib options. We also make sure that we don't # ever reference other .la files, only referring to other libraries -# via the usual "-L/path -llib" and making sure that /path is always -# somewhere under the default view. This makes wildcard dependencies -# work for "overwrite" packages by letting libtool find libraries in -# the default view. +# via the usual "-L/path -llib". BUILDLINK_DIR="@BUILDLINK_DIR@" -DEPOTBASE="@DEPOTBASE@" LOCALBASE="@LOCALBASE@" WRKSRC="@WRKSRC@" @@ -257,12 +253,7 @@ if $test -f $lafile; then ;; ###################################### # Skip directories that should never - # appear in the -L<dir> flags. Also - # modify directories in ${DEPOTBASE} to - # point to somewhere in the default view - # ${LOCALBASE}, since we want "overwrite" - # packages to think the libraries really - # do just exist through the default view. + # appear in the -L<dir> flags. ###################################### -L*) case $i in @@ -270,14 +261,6 @@ if $test -f $lafile; then ;; -L${WRKSRC}|-L${WRKSRC}/*) ;; - -L${DEPOTBASE}/*) - i=`$echo "$i" | $sed -e "s,-L${DEPOTBASE}/[^/]*/,-L${LOCALBASE}/,"` - case $L in - *"$i "*) ;; - *"$i") ;; - *) L="$L $i" ;; - esac - ;; *) case $L in *"$i "*) ;; @@ -299,17 +282,11 @@ if $test -f $lafile; then ###################################### # Libtool archives should be changed from # "/path/libfoo.la" to "-L/path -lfoo", - # where /path is appropriately modified - # so that the depot directory is changed - # to the views directory. This allows - # the .la files to be used by either - # "overwrite" or "pkgviews" packages and - # works correctly with wildcard + # This works correctly with wildcard # dependencies. ###################################### *.la) - dirbase=`$dirname $i` - dir=`$echo "X$dirbase" | $Xsed -e "s,^${DEPOTBASE}/[^/]*/,${LOCALBASE}/,"` + dir=`$dirname $i` case $L in *"-L$dir "*) ;; *"-L$dir") ;; |