On 2021/02/04 12:41, Charlene Wendling wrote:
> The below diff updates wmitime to 0.5. This dockapp now uses
> libdockapp, so there is no further patch for -fno-common needed.
> 
> Port-wise:
> 
> - provide .desktop file, manpage and HOMEPAGE
> - drop wmgeneral patch since it's dealt with by libdockapp
> - add build flags for iconv, it has been forgotten by upstream
> 
> Testing: 
> 
> This builds and works fine on macppc and amd64.
> 
> Comments/feedback are welcome,
> 
> Charlène.
> 

small comments;

> Index: Makefile
> ===================================================================
> RCS file: /cvs/ports/x11/wmitime/Makefile,v
> retrieving revision 1.19
> diff -u -p -u -p -r1.19 Makefile
> --- Makefile  12 Jul 2019 20:51:24 -0000      1.19
> +++ Makefile  1 Feb 2021 13:36:07 -0000
> @@ -2,25 +2,33 @@
>  
>  COMMENT=             wm-dockapp; shows the date, time, and Internet time
>  
> -DISTNAME=            wmitime-0.3
> -REVISION=            2
> +DISTNAME=            wmitime-0.5
>  CATEGORIES=          x11 x11/windowmaker
>  
> +HOMEPAGE=            https://www.dockapps.net/wmitime
> +
>  # GPL
>  PERMIT_PACKAGE=      Yes
> -WANTLIB=             X11 Xext Xpm c m
>  
> -MASTER_SITES=                http://dockapps.org/files/22/29/ \
> -                     http://web.cs.mun.ca/~gstarkes/wmaker/dockapps/files/
> +WANTLIB += X11 Xext Xpm c dockapp iconv m
> +
> +MASTER_SITES=                https://www.dockapps.net/download/
>  
> -MAKE_FLAGS=          CC="${CC}"
> +RUN_DEPENDS=         devel/desktop-file-utils
> +LIB_DEPENDS=         converters/libiconv \
> +                     devel/libdockapp>=0.7.3
> +
> +MAKE_FLAGS=          CC="${CC}" PREFIX="${PREFIX}" \
> +                     CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}"
>  
>  NO_TEST=             Yes
>  
> -WRKDIST=             ${WRKDIR}/wmitime
> -WRKSRC=                      ${WRKDIST}/wmitime
> +CFLAGS+=             -I${LOCALBASE}/include -I${X11BASE}/include
> +LDFLAGS+=    -L${LOCALBASE}/lib -L${X11BASE}/lib
> +
> +WRKDIST=             ${WRKDIR}/dockapps-26db447
>  
> -do-install:
> -     ${INSTALL_PROGRAM} ${WRKBUILD}/wmitime ${PREFIX}/bin
> +#do-install:
> +#    ${INSTALL_PROGRAM} ${WRKBUILD}/wmitime ${PREFIX}/bin

might as well just remove those lines

> +Index: Makefile
> +--- Makefile.orig
> ++++ Makefile
> +@@ -1,19 +1,18 @@
> +-LIBS   = -lXpm -lXext -lX11 -lm -ldockapp
> +-CFLAGS = -O2 -Wall
> ++LIBS   = -lXpm -lXext -lX11 -lm -ldockapp -liconv
> + OBJS = wmitime.o
> + INSTALL = install
> +-PREFIX = /usr/local
> ++PREFIX ?= /usr/local
> + BINDIR = $(PREFIX)/bin
> +-MANDIR = $(PREFIX)/share/man/man1
> ++MANDIR = $(PREFIX)/man/man1
> + DESKTOPDIR = $(PREFIX)/share/applications

variables set on the make command line (via MAKE_FLAGS) override
settings in the Makefile, so there's no need to patch them. with this
port, it makes sense to patch LIBS (you don't want to copy the line
from the upstream Makefile to ports) but for the variables which are
completely overridden (CFLAGS, MANDIR, PREFIX) they don't need patching.

obviously it works either way (and I'm also OK with this as-is), but the
fewer lines in a patch, the more likely it will stay applying cleanly
with future updates.

this doesn't work for ports where the upstream Makefile runs a second
copy of make e.g. in a subdirectory, but in most cases it's just fine.

OK

Reply via email to