summaryrefslogtreecommitdiff
path: root/Mk/Uses/libtool.mk (follow)
Commit message (Collapse)AuthorAgeFilesLines
* framework: Remove $FreeBSD$Mathieu Arnold2021-04-061-2/+0
| | | | Where appropriate fiddle with a few other things.
* libtool.mk: pass through LDFLAGS -fuse-ld=*Ed Maste2017-12-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some ports depend on permissive or broken behaviour from the GNU BFD linker, ld.bfd. Clang and GCC support a -fuse-ld= flag to choose a specific linker, and as we migrate to installing lld as the base system /usr/bin/ld we'll want to make use of -fuse-ld=bfd to use bfd for ports that fail to link, or fail to run when linked with lld. An upstream libtool change[1] from Feb 2016 supports passing through -fuse-ld=, but it has not yet made it into a release. Patch an equivalent change into ltmain.sh via Mk/Uses/libtool.mk. Original proposal just patched ltmain.sh in devel/libtool. That would address ports that run libtoolize via autoreconf, including lang/mono which is one of the ports that fails to link with lld and responsible for many downstream skipped ports. Patching ltmain.sh via libtool.mk (tijl's suggestion) handles that case as well as ports that include their own copy of ltmain.sh. A later change may patch devel/libtool so that -fuse-ld works if using a ports-installed libtool to build software outside of the ports tree; the change in this commit is intended to address building in the ports tree. [1] http://git.savannah.gnu.org/cgit/libtool.git/commit/?id=f9970d99293faf908fdc153a653fa5781095fb7a PR: 214864, 224514 Reviewed by: tijl Approved by: portmgr (antoine) Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D13589 Notes: svn path=/head/; revision=457295
* Take maintainership from autotools@. That group is no longer active.Tijl Coosemans2017-12-231-1/+1
| | | | Notes: svn path=/head/; revision=457052
* Remove the now unneeded ${PORTSDIR} from dependency definition inBaptiste Daroussin2016-03-271-1/+1
| | | | | | | | | | | The infrastructure Makefiles PR: 206569 Exp run by: antoine Differential Revision: D5047 Notes: svn path=/head/; revision=411970
* Readd PORTSDIR for now we will only start removing them after 2016Q1 is branchedBaptiste Daroussin2015-10-151-1/+1
| | | | | | | | This gives more time for tools to get updated, available in packages etc before bothering users Notes: svn path=/head/; revision=399326
* Drop the necessity to add ${PORTSDIR} to dependency lineBaptiste Daroussin2015-10-141-1/+1
| | | | | | | | | | | | | | Modify make describe to automatically prepend ${PORTSDIR} if the path for the port is not absolute Checked with poudriere, portmaster, portupgrade PR: 203685 Exp-run by: antoine Differential Revision: https://reviews.freebsd.org/D3866 Notes: svn path=/head/; revision=399278
* Rewrite the target ordering code.Mathieu Arnold2015-08-171-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The targets now have priority assigned to them, and, when the dependency ordering magic is done at the end of bsd.port.mk, they are sorted according to their priority. This allows USES to add targets easily and have them run whenever they want without touching bsd.port.mk. To add a target that runs just before post-configure run, do: _USES_configure+= 695:my-post-configure my-post-configure: do something To fine tune when the target is ran, look at the values in the *_SEQ variables at the end of bsd.port.mk, and the other USES. Allow ports Makefiles to override the priority of targets with the TARGET_ORDER_OVERRIDE variable. For example, to get post-install running earlier, (its default is 700) do: TARGET_ORDER_OVERRIDE= 650:post-install While there, add options target helpers for the do-* targets when they exist. Reviewed by: antoine, bapt Exp-run by: antoine Sponsored by: Absolight Differential Revision: https://reviews.freebsd.org/D3099 Notes: svn path=/head/; revision=394503
* By default libtool replaces -export-symbols <file> with -retain-symbols-fileTijl Coosemans2015-08-021-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | <file> on ELF systems, but this doesn't really do what -export-symbols is meant to do. On GNU ELF systems it converts <file> to a simple version script first and then uses -version-script instead of -retain-symbols-file. Let USES=libtool patch libtool scripts to do this on all systems with GNU ld(1). Bump PORTREVISION on all ports where the build log contains -export-symbols. audio/calf: This port builds a module that now exports only one function, but it also builds a number of executables that link to this module and expect to see other functions. Because it's already a bit dodgy to link to a module (libtool warns about this) let the module continue to export only one function and instead build an ordinary library from the same source that the executables can link to. Fix a number of other issues in the same Makefile.am and clean up the port Makefile. japanese/scim-honoka: Tries to hide all symbols that start with an underscore, but because this library is written in C++ all symbols start with _Z so it ends up hiding everything. Just don't hide anything at all like the textproc/scim configure script does. multimedia/schroedinger: Apply an upstream patch. textproc/scim-input-pad: Same as japanese/scim-honoka. PR: 201922 Approved by: portmgr (antoine) Exp-run by: antoine Notes: svn path=/head/; revision=393429
* Make ports using libtool treat elftoolchain's strip the same as GNU stripAntoine Brodin2015-06-081-0/+1
| | | | | | | | | | | | Any strip on any FreeBSD version should be able to handle stripping requested by libtool PR: 198611 Reviewed by: emaste Exp-run: self Notes: svn path=/head/; revision=388831
* Don't use the default backup suffixJan Beich2015-02-161-2/+2
| | | | | | | | | | | | | | | Rename backup file in order to avoid conflict with default suffix as used by REINPLACE_CMD in post-patch. This facilitates reviewing changes done by each step after the build. PR: 197502 Exp-run by: antoine Approved by: autotools (tijl, maintainer) Approved by: portmgr (antoine) Approved by: mentors (implicit) Notes: svn path=/head/; revision=379071
* - Update devel/automake to 1.15Tijl Coosemans2015-01-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | - Update devel/gettext to 0.19.4 - Update devel/libtool and devel/libltdl to 2.4.5 - This version of libtool has been fixed to pass -fstack-protector to the compiler during linking. Add the same fix to USES=libtool. This should improve SSP support on FreeBSD/i386 8 and 9. - databases/libmemcached, security/sssd: patch configure.ac so AC_CONFIG_AUX_DIR appears earlier. For databases/libmemcached changing configure.ac causes manpages to be regenerated which requires extra dependencies so patch a makefile to prevent that. - devel/xfce4-dev-tools: only depend on recent versions of autoconf and automake PR: 196938 Exp-run by: antoine Approved by: portmgr (antoine) Notes: svn path=/head/; revision=377757
* Replace USES=libtool:oldver with USES=libtool or USES=libtool:keepla inTijl Coosemans2014-12-081-18/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the 32 ports that still use it. Bump PORTREVISION on their dependent ports except the ones that depend on these: audio/libogg audio/libvorbis devel/pcre ftp/curl graphics/jpeg graphics/libart_lgpl graphics/tiff textproc/expat2 textproc/libxslt In these cases the same trick as in the recent gettext update is used. The ports install a symlink with the old library version. When enough of their dependent ports have had regular updates the remaining ones can get a PORTREVISION bump and the links can be removed. Also remove the devel/pcre dependency from USE_GNOME=glib20. It causes over 2200 packages to depend on devel/pcre while less than 200 actually link with it. The glib20 package still depends on devel/pcre so this should not make a difference for ports with USE_GNOME=glib20. Also, libdata/pkgconfig/glib-2.0.pc lists pcre as a private library so USE_GNOME=glib20 should not propagate it. PR: 195724 Exp-run by: antoine Approved by: portmgr (antoine) Notes: svn path=/head/; revision=374303
* - Update devel/libtool and devel/libltdl to version 2.4.2.418Tijl Coosemans2014-10-051-0/+2
| | | | | | | | | | | | | | | | | | | - Patch libtool so it uses the same library version specification as on Darwin, Linux and other systems. Given the version current:revision:age a library will be given the extension .so.major.age.revision with major equal to current-age. Before libtool would use .so.current on FreeBSD. - Patch libtoolize to remove two cases of umask 0 that caused libltdl files to be copied world writable (--ltdl option) - Let USES=libtool patch this new version correctly - Adjust all ports with USES=libtool:build and bump PORTREVISION on their dependent ports if a library version changed PR: 194068 Exp-run by: antoine Approved by: portmgr (antoine) Notes: svn path=/head/; revision=370099
* Change the way USES is handled:Tijl Coosemans2014-09-281-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | - Loop over USES twice, once to define all *_ARGS variables and once to include Uses/*.mk. This allows all Uses/*.mk to examine arguments given to other USES entries. - Always define *_ARGS (possibly empty) and replace commas with spaces. Similar for _USES_POST. Adjust all Uses/*.mk: - defined(u_ARGS) becomes !empty(u_ARGS) - Eliminate helper variables like _*_ARGS=${*_ARGS:C/,/ /g} - Some Uses/*.mk used ":" as argument separator instead of ",", but no port used this form - Uses/cran.mk: remove unused variable VALID_ARGS and USES+=fortran which has no effect - Uses/twisted.mk: simplify handling of the case where neither "build" nor "run" arguments have been specified PR: 193931 Exp-run by: antoine Approved by: portmgr (antoine) Notes: svn path=/head/; revision=369465
* Turn the installation of *.la files, without some form of USES=libtool inTijl Coosemans2014-09-151-6/+3
| | | | | | | | | | | | | | | | | | the port Makefile, into a stage-qa error. All ports that would trigger this error have been converted. Many thanks to all people involved in this, especially Dmitry Marakasov (amdmi3) who handled most ports. At this moment over 2200 ports have USES=libtool and over 20000 library dependencies between packages have been removed. This also marks the point where :keepla is no longer special. It is now only needed if a port uses *.la files at run-time. QA-run by: antoine Approved by: portmgr (antoine) Notes: svn path=/head/; revision=368281
* Tell realpath to stay quiet if it cannot resolve a linkTijl Coosemans2014-09-141-1/+1
| | | | | | | Approved by: portmgr (bdrewery) Notes: svn path=/head/; revision=368217
* Allow this to work on DragonFly which does not have the -f param for readlink(1)Bryan Drewery2014-09-131-1/+1
| | | | | | | | Tested by: marino With hat: portmgr Notes: svn path=/head/; revision=368136
* Let USES=libtool also delete links to .la files (and links to links to...)Tijl Coosemans2014-09-081-0/+4
| | | | | | | Approved by: portmgr (antoine) Notes: svn path=/head/; revision=367620
* After patching configure restore the original modification time. ThisTijl Coosemans2014-09-051-4/+6
| | | | | | | | | | | avoids running makefile targets that depend on configure such as the PDF documentation in textproc/flex. Reported by: hrs Approved by: portmgr (bapt) Notes: svn path=/head/; revision=367345
* Add support for USES=libtool:build. It adds a build dependency onTijl Coosemans2014-08-101-2/+9
| | | | | | | | | | devel/libtool and can be used when a port does not generate its own libtool script but relies on the system to provide one. Approved by: portmgr (antoine) Notes: svn path=/head/; revision=364538
* Remove two libtool fixes from Mk/Uses/libtool.mk. They don't always workTijl Coosemans2014-07-231-4/+0
| | | | | | | | | | | | | | | | | | | | | | | when an older version of a package is installed. This is the case when an executable links with installed libraries and with uninstalled libraries that link with other uninstalled libraries. For each of the directly linked libraries the executable will have an rpath (/usr/local/lib for the installed libraries and a path under WRKDIR for each of the uninstalled libraries), but not for the indirect libraries. Both ld(1) and rtld(1) search the rpath of the executable first before any rpath of libraries, so the indirectly linked libraries will be found in /usr/local/lib if they are installed instead of in WRKDIR. With this commit executables will overlink with uninstalled indirect libraries again so their location is added to the rpath of the executable. This partially reverts r358784. PR: 191611 Approved by: portmgr (bapt) Notes: svn path=/head/; revision=362656
* Add 4 new sed commands to USES=libtool. The first two apply some of theTijl Coosemans2014-06-221-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | changes that Debian made to their libtool. The first command applies to libtool versions 1.4 and up. The second command is somewhat more elaborate but essentially it uses the sed hold space to move an "elif...fi" block down. It applies to 2.x. Together these reduce overlinking to unpatched .la files (from ports that don't have USES=libtool yet but also .la files in the work directory). The third and fourth command fix relinking. During staging libtool may relink libA when it links to another library in the work directory libB. The reason is that libA created during build phase has its runpath set to the location of libB in the work directory. This allows running an executable that links to libA from within the work directory. The relink removes this extra runpath. When libtool relinks libA it replaces "libB.la" on the linker command line with "-L${STAGEDIR}${PREFIX}/lib -lB" with the intention to link to libB in the stage directory but this -L flag isn't necessarily the first so another libB may be linked instead. The two sed commands make relink the same as a normal link. This means libtool will relink with libraries from the work directory using a path similar to "../srcB/.libs/libB.so" without -L flags. This applies to libtool 1.4 and up. Earlier versions don't seem to relink libraries. (This fixes ports like devel/apr1 so they link with freshly built libraries instead of installed libraries.) Fix all ports with missing libraries. Additionally: archivers/rpm4: USES=patchfix. databases/gdbm: INSTALL_TARGET=install-strip. devel/gnome-vfs: remove patch that doesn't change anything. devel/ois: INSTALL_TARGET=install-strip and use standard USE_AUTOTOOLS. devel/zziplib: INSTALL_TARGET=install-strip, MAKE_CMD. multimedia/mjpegtools: remove USE_AUTOTOOLS, use modern compiler on i386 instead of disabling optimisations. net/libnetdude: disable static plugins. PR: 190941 Exp-run: antoine Approved by: portmgr (antoine) Notes: svn path=/head/; revision=358784
* When linking a library libA with a library libB using libtool, if libB.laTijl Coosemans2014-04-231-1/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | exists, libtool will add all libraries libB.la refers to (dependency_libs field) to the linker command line and store them in the dependency_libs field of libA.la. So everything that subsequently links with libA will also link to these extra libraries. This causes too much overlinking. This commit modifies Mk/Uses/libtool.mk so it empties the dependency_libs field in .la libraries during staging. However, because .la libraries have very limited use when dependency_libs is empty it makes sense to completely remove them during staging. So with this commit USES=libtool is modified to remove .la libraries and a new form (USES=libtool:keepla) is introduced in case they need to be kept (dependency_libs is still emptied). PORTREVISION is bumped on all ports with USES=libtool that install .la libraries. Most ports are also changed to add :keepla because .la libraries have to be kept around as long as there are dependent ports with .la libraries that refer to them in their dependency_libs field. In most cases :keepla can be removed again as soon as all dependent ports that install .la libraries have some form of USES=libtool added to their Makefile. PR: ports/188759 Exp-run: bdrewery Approved by: portmgr (bdrewery) Notes: svn path=/head/; revision=351936
* Move MAINTAINER lines to the end of the initial comment block andGerald Pfeifer2014-03-151-2/+2
| | | | | | | | | make things a bit more consistent. Approved by: portmgr (bapt) Notes: svn path=/head/; revision=348308
* Further restrict the dragonfly RE so it only matches freebsd* as the firstTijl Coosemans2014-03-031-1/+1
| | | | | | | | | word on a line. PR: ports/187208 Notes: svn path=/head/; revision=346901
* In libtool.mk, let the regexp for DragonFly BSD support match bothTijl Coosemans2014-03-021-1/+1
| | | | | | | | | | "freebsd*)" and "freebsd* ", and add "dragonfly*" only if it isn't there already. Approved by: bapt Notes: svn path=/head/; revision=346763
* - Some ports ship with libtool 1.5.x + "anygcc" patch. This modifiedTijl Coosemans2014-02-271-0/+6
| | | | | | | | | | | | | | | | version calls "gcc" in two places. Replace that with $CC. - r346193 added -B${LOCALBASE}/bin in Uses/fortran.mk, just like compiler.mk, but libtool doesn't recognise this flag and discards it. Patch ltmain.sh so it passes the flag to the linker unmodified. This only works on libtool 2.x for now, but that's good enough to fix the PRs below and a linker error in math/octave on FreeBSD/i386 8.x. (When those ports set USES=libtool.) PR: ports/186946, ports/187000 Approved by: bapt Notes: svn path=/head/; revision=346312
* Revert r345514 for now, it causes libraries to be built without .soBryan Drewery2014-02-211-2/+1
| | | | Notes: svn path=/head/; revision=345551
* Mk/Uses/libtool.mk: Add DragonFly support to USES+= libtoolJohn Marino2014-02-211-0/+1
| | | | | | | Approved by: portmgr (bapt) Notes: svn path=/head/; revision=345519
* libtool 1.4.2a was defining the shared extension as shrext_cmds, rename it ↵Baptiste Daroussin2014-02-211-1/+2
| | | | | | | | | shared_ext like in newer libtool so the rest of USES=iconv magic just works Notes: svn path=/head/; revision=345514
* - Also set link_all_deplibs_(CXX|F77|FC)=no.Tijl Coosemans2014-02-141-2/+4
| | | | | | | | | | | | | | | - In libtool 1.3 set deplibs_check_method=pass_all like it is in later versions. This avoids checking every library with file(1) to see if it's really a library and avoids some incorrect uses of expr(1) ("expr $var" instead of "expr -- $var" where $var can start with -l). The parsing of file(1) output is also tested during configure on /usr/lib/libc.so.* which doesn't exist so configure printed a big (but harmless) warning. Approved by: bapt Notes: svn path=/head/; revision=344318
* - Support libtool 1.3 which has an ltconfig script.Tijl Coosemans2014-02-091-8/+14
| | | | | | | - Support -shrext command line option. (Used in audio/pd.) Notes: svn path=/head/; revision=343547
* Fix usage with older makeBaptiste Daroussin2014-01-281-1/+2
| | | | Notes: svn path=/head/; revision=341658
* Introduce USES=libtool to replace USE_AUTOTOOLS=libtool.Tijl Coosemans2014-01-281-0/+41
Unlike USE_AUTOTOOLS=libtool which makes a port use libtool from devel/libtool, this just patches the copy of libtool included in the port. This allows adding it to all ports that use libtool including ports that build Fortran libraries and ports that use different compilers or binutils than the ones used to build devel/libtool. USES=libtool also changes the library naming specification similar to what USE_GNOME=ltverhack does. Given the libtool version info $current:$revision:$age and $major=$current-$age the library will be named libname.so.$major.$age.$revision instead of libname.so.$current and libname.so.$major becomes a symlink. Because $major increases less frequently than $current this reduces the number of library version bumps which means fewer rebuilds of dependent packages. To ease the conversion from USE_AUTOTOOLS=libtool this naming spec can be disabled with USES=libtool:oldver but the intention is that all libtool ports eventually use the new naming. Another change is that only libraries that are listed on the command line will be linked into executables. Normally libtool would link in the entire tree of library dependencies. This reduces the number of direct dependencies on a given library which means fewer packages need to be rebuilt on a library version bump. Approved by: portmgr (bapt) Notes: svn path=/head/; revision=341646