Summary: | [UPDATE] lang/execline: update to 2.0.2.0 and take maintainership | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | Ports & Packages | Reporter: | Colin Booth <colin-ports> | ||||||||
Component: | Individual Port(s) | Assignee: | Jan Beich <jbeich> | ||||||||
Status: | Closed FIXED | ||||||||||
Severity: | Affects Only Me | CC: | jbeich | ||||||||
Priority: | --- | ||||||||||
Version: | Latest | ||||||||||
Hardware: | Any | ||||||||||
OS: | Any | ||||||||||
Bug Depends on: | 197233 | ||||||||||
Bug Blocks: | 197235 | ||||||||||
Attachments: |
|
Comment on attachment 152430 [details] unified diff to bump lang/execline to current > +LDFLAGS?= -s > +STRIPFLAGS?= -x Better use ${STRIP} or depend on ! ${PORT_OPTIONS:MDEBUG} and maybe use vendor `strip` make target e.g., # STRIP can only be `-s` or empty ALL_TARGET= all ${STRIP:S/-s/strip/} > +CC?= cc CC is always defined by sys.mk (fmake, bmake) or embedded (gmake). > +WRKSRC= ${WRKDIR}/${DISTNAME} No need to redefine the default value. > +USES= ${GMAKE} This works only by accident because the path to GNU make isn't an absolute one. > + cd ${WRKSRC} && CC=${CC} ./configure \ > + --prefix=${LOCALBASE} \ > + --with-default-path=${LOCALBASE}/bin:/usr/bin:/bin \ > + --with-include=${LOCALBASE}/include \ > + --with-lib=${LOCALBASE}/lib/skalibs \ > + --enable-shared Define HAS_CONFIGURE and populate CONFIGURE_ARGS. This would also fix a case where CC contains spaces e.g., CC = distcc ccache gcc > do-build: > + cd ${WRKSRC} && ${GMAKE} Drop custom do-build and maybe define empty ALL_TARGET if `all` doesn't work. > do-install: > + cd ${WRKSRC} && DESTDIR=${STAGEDIR} ${GMAKE} install Why not use default do-install and move the following lines under post-install? > @${MKDIR} ${STAGEDIR}${DOCSDIR} > + cd ${WRKSRC} && ${INSTALL_MAN} ${DOCS} ${STAGEDIR}${DOCSDIR} INSTALL_MAN is for manpages only. Other docs should use INSTALL_DATA. > +lib/libexecline.so > +lib/libexecline.so.2 This requires USE_LDCONFIG in Makefile. Comment on attachment 152430 [details] unified diff to bump lang/execline to current > + --prefix=${LOCALBASE} \ This would break install if PREFIX != LOCALBASE i.e., poudriere testport -P. You may need to pass --with-sysdeps as well to unbreak it. (In reply to Jan Beich from comment #1) >> @${MKDIR} ${STAGEDIR}${DOCSDIR} >> + cd ${WRKSRC} && ${INSTALL_MAN} ${DOCS} ${STAGEDIR}${DOCSDIR} > > INSTALL_MAN is for manpages only. Other docs should use INSTALL_DATA. Nevermind, Porter's Handbook disagrees with me. I was confused by bsd.own.mk using MANMODE for something else and INSTALL_DATA now uses 0644 mode since ports r367307. (In reply to Jan Beich from comment #1) >> +LDFLAGS?= -s >> +STRIPFLAGS?= -x >Better use ${STRIP} or depend on ! ${PORT_OPTIONS:MDEBUG} and maybe use vendor >`strip` make target e.g., > # STRIP can only be `-s` or empty > ALL_TARGET= all ${STRIP:S/-s/strip/} Adapted from the old Makefile for skalibs in ports. I'll yank those out because it doesn't run strip by default anyway. >> +CC?= cc >CC is always defined by sys.mk (fmake, bmake) or embedded (gmake). >> +WRKSRC= ${WRKDIR}/${DISTNAME} >No need to redefine the default value. You're right on both counts. I thought I'd have to force-define what the default cc pointed to since without specifying CC=${CC} the upstream Makefile autodetects a compiler that doesn't support the -i flag. As for WRKSRC, I don't know why I didn't think that came included. >> +USES= ${GMAKE} >This works only by accident because the path to GNU make isn't an absolute one. That was on the suggestion of portlint since building execline (and skalibs and s6) don't work with the stock make and I'm working around a reasonably linux-tools centric design. >Define HAS_CONFIGURE and populate CONFIGURE_ARGS. This would also fix a case where CC contains spaces e.g., Unless I'm reading the porters stuff wrong HAS_CONFIGURE only works with autoconf and its ilk. Since skalibs et. al. don't use autotools I'm going to omit HAS_CONFIGURE (it seems to be ignored). However, that appears to mean that I need the CC=${CC} definition which breaks if there's a multiple item CC definition. If I find out a better way to override this, I'll fix it. >do-build... >do-install... >use post-install... All good suggestions and updated. >> +lib/libexecline.so >> +lib/libexecline.so.2 >This requires USE_LDCONFIG in Makefile. Missed that in the port handbook. Updated. >> + --prefix=${LOCALBASE} \ >This would break install if PREFIX != LOCALBASE i.e., poudriere testport -P. >You may need to pass --with-sysdeps as well to unbreak it. Changed all LOCALBASE to PREFIX though that's still going to break if skalibs isn't going to be installed in the same root tree since execline needs to find the skalibs headers and I'm unaware of a good way of autodetecting that. Related to that, I've debated whether to static link libskarnet into the execline binaries. On the one hand dynamic linking is the standard, on the other it's nice to have the only external runtime dependency be your libc for things like proces supervisors. Since there's already a compile-time dependency on skalibs being installed in the same PREFIX as execline I'm going to leave it the default (static linking) unless there's a serious argument in the other direction. Thanks for the commentary and advice, the skarnet stuff is my first foray into porting so I'm sure I'll make mistakes along the way. (In reply to Colin Booth from comment #4) > (In reply to Jan Beich from comment #1) > >>> +LDFLAGS?= -s >>> +STRIPFLAGS?= -x > >>Better use ${STRIP} or depend on ! ${PORT_OPTIONS:MDEBUG} and maybe use vendor `strip` make target e.g., > >> # STRIP can only be `-s` or empty >> ALL_TARGET= all ${STRIP:S/-s/strip/} > Adapted from the old Makefile for skalibs in ports. I'll yank those out because > it doesn't run strip by default anyway. Not stripping binaries at all would induce a warning: $ DEVELOPER=1 make ... ====> Running Q/A tests (stage-qa) Warning: 'bin/shift' is not stripped consider trying INSTALL_TARGET=install-strip or using ${STRIP_CMD} Warning: 'bin/pipeline' is not stripped consider trying INSTALL_TARGET=install-strip or using ${STRIP_CMD} ... >>> +USES= ${GMAKE} >>This works only by accident because the path to GNU make isn't an absolute one. > > That was on the suggestion of portlint since building execline (and skalibs and > s6) don't work with the stock make and I'm working around a reasonably > linux-tools centric design. Many commands in Mk/bsd.commands.mk can be redefined by user or port maintainer. USES=gmake is valid, but not USES=${GMAKE}. And portlint(1) is smarter nowadays not to print some bogus warnings. > >>Define HAS_CONFIGURE and populate CONFIGURE_ARGS. This would also fix >> a case where CC contains spaces e.g., > Unless I'm reading the porters stuff wrong HAS_CONFIGURE only works with > autoconf and its ilk. Since skalibs et. al. don't use autotools I'm going to > omit HAS_CONFIGURE (it seems to be ignored). However, that appears to mean that > I need the CC=${CC} definition which breaks if there's a multiple item CC > definition. If I find out a better way to override this, I'll fix it. HAS_CONFIGURE is for generic configure-like scripts. It has no assumption about GNU autoconf. Look for defined(HAS_CONFIGURE) in Mk/bsd.port.mk to see what exactly you'd get. To summarize, more environment variables passed by default, they're properly quoted Also check other ports with HAS_CONFIGURE e.g., lang/ocaml or lang/perl5.18. >>> + --prefix=${LOCALBASE} \ >>This would break install if PREFIX != LOCALBASE i.e., poudriere >> testport -P. >You may need to pass --with-sysdeps as well to unbreak >> it. > Changed all LOCALBASE to PREFIX though that's still going to break if skalibs > isn't going to be installed in the same root tree since execline needs to find > the skalibs headers and I'm unaware of a good way of autodetecting that. LOCALBASE is where dependencies are already installed. PREFIX is where the current port is supposed to install. Before STAGEDIR support people used to check pkg-plist by overrding PREFIX to a temporary location. The following should be enough for LOCALBASE != PREFIX support. # devel/skalibs CONFIGURE_ARGS= --prefix=${PREFIX} \ # lang/execline CONFIGURE_ARGS= --prefix=${PREFIX} \ --with-sysdeps=${LOCALBASE}/lib/skalibs/sysdeps \ --with-include=${LOCALBASE}/include \ --with-lib=${LOCALBASE}/lib/skalibs \ Created attachment 152586 [details]
Updated Makefile with advice from Jan Beich
Created attachment 152628 [details]
Updated patch
A commit references this bug: Author: jbeich Date: Tue Feb 10 20:33:54 UTC 2015 New revision: 378797 URL: https://svnweb.freebsd.org/changeset/ports/378797 Log: - devel/skalibs: update to 2.2.1.0 [1] - lang/execline: update to 2.0.2.0 [2] - Pass maintainership to the submitter [1][2] - Mark sysutils/runwhen as BROKEN PR: 197233 [1] PR: 197234 [2] Differential Revision: https://reviews.freebsd.org/D1818 Submitted by: Colin Booth <colin@heliocat.net> Approved by: portmgr (bapt) [1] Approved by: bapt (mentor) Changes: head/devel/skalibs/Makefile head/devel/skalibs/distinfo head/devel/skalibs/pkg-descr head/devel/skalibs/pkg-plist head/lang/execline/Makefile head/lang/execline/distinfo head/lang/execline/pkg-descr head/lang/execline/pkg-plist head/sysutils/runwhen/Makefile Committed with minor changes: no need .for loop over STRIP_CMD. Thanks. |
Created attachment 152430 [details] unified diff to bump lang/execline to current I'm using s6 for supervision and the execline and skalibs in ports is very out of date. This updates the execline in ports to use 2.0.0.0.