Re: UPDATE: graphics/farbfeld 3 -> 4

2018-04-28 Thread Stuart Henderson
Btw (as was done in the certain that got committed), as long as it doesn't 
call make recursively, just use MAKE_FLAGS and it overrides variables from 
the file, so there's no need to patch with ?=.


--
Sent from a phone, apologies for poor formatting.
On 28 April 2018 16:40:39 Kaashif Hymabaccus  wrote:


On Sat, Apr 28, 2018 at 03:11:08PM +0100, Stuart Henderson wrote:
> Please don't rely on the cc wrapper. It's a hack for certain situations.
> Also it's easier to verify that a port does the right thing if CC is
> passed correctly.

OK, here is a diff that leaves the CC stuff as it was, passed in
MAKE_ENV and config.mk is patched with ?= so it gets picked up.

diff --git Makefile Makefile
index 8d499d1ad33..7a0cc01f58c 100644
--- Makefile
+++ Makefile
@@ -1,7 +1,7 @@
# $OpenBSD: Makefile,v 1.1.1.1 2017/10/23 21:39:20 bcallah Exp $

COMMENT =   lossless, uncompressed graphics format
-DISTNAME = farbfeld-3
+DISTNAME = farbfeld-4
CATEGORIES =graphics converters

HOMEPAGE =  https://tools.suckless.org/farbfeld
@@ -19,9 +19,16 @@ LIB_DEPENDS =graphics/png \

RUN_DEPENDS =   graphics/ImageMagick

-USE_GMAKE =Yes
MAKE_ENV =  CC="${CC}"

NO_TEST =   Yes

+do-install:
+   ${INSTALL_PROGRAM} \
+   ${WRKBUILD}/{ff2jpg,ff2pam,ff2png,ff2ppm,jpg2ff,png2ff} \
+   ${PREFIX}/bin/
+   ${INSTALL_SCRIPT} ${WRKSRC}/2ff ${PREFIX}/bin/
+   ${INSTALL_MAN} ${WRKSRC}/*.1 ${PREFIX}/man/man1/
+   ${INSTALL_MAN} ${WRKSRC}/*.5 ${PREFIX}/man/man5/
+
.include 
diff --git distinfo distinfo
index c632a202e9e..a5f2d6668be 100644
--- distinfo
+++ distinfo
@@ -1,2 +1,2 @@
-SHA256 (farbfeld-3.tar.gz) = W5U7hqctP+rt9iaYUyyIiOX24vY2MZOkzIzuDjjDeK0=
-SIZE (farbfeld-3.tar.gz) = 10169
+SHA256 (farbfeld-4.tar.gz) = x99ZIe3RIcpdWxz2+wHkMK/5sxJCJi5PaQ069yzL5yo=
+SIZE (farbfeld-4.tar.gz) = 10340
diff --git patches/patch-Makefile patches/patch-Makefile
deleted file mode 100644
index c42275f1f20..000
--- patches/patch-Makefile
+++ /dev/null
@@ -1,27 +0,0 @@
-$OpenBSD: patch-Makefile,v 1.1.1.1 2017/10/23 21:39:20 bcallah Exp $
-
-Index: Makefile
 Makefile.orig
-+++ Makefile
-@@ -38,15 +38,12 @@ dist:
-   rm -rf "farbfeld-$(VERSION)"
-
- install: all
--  mkdir -p "$(DESTDIR)$(PREFIX)/bin"
--  cp -f $(SCR) $(BIN) "$(DESTDIR)$(PREFIX)/bin"
--  for f in $(BIN) $(SCR); do chmod 755 "$(DESTDIR)$(PREFIX)/bin/$$f"; done
--  mkdir -p "$(DESTDIR)$(MANPREFIX)/man1"
--  cp -f $(MAN1) "$(DESTDIR)$(MANPREFIX)/man1"
--  for m in $(MAN1); do chmod 644 "$(DESTDIR)$(MANPREFIX)/man1/$$m"; done
--  mkdir -p "$(DESTDIR)$(MANPREFIX)/man5"
--  cp -f $(MAN5) "$(DESTDIR)$(MANPREFIX)/man5"
--  for m in $(MAN5); do chmod 644 "$(DESTDIR)$(MANPREFIX)/man5/$$m"; done
-+  ${BSD_INSTALL_PROGRAM_DIR} "$(PREFIX)/bin"
-+  ${BSD_INSTALL_PROGRAM} $(SCR) $(BIN) "$(PREFIX)/bin"
-+  ${BSD_INSTALL_MAN_DIR} "$(MANPREFIX)/man1"
-+  ${BSD_INSTALL_MAN} $(MAN1) "$(MANPREFIX)/man1"
-+  ${BSD_INSTALL_MAN_DIR} "$(MANPREFIX)/man5"
-+  ${BSD_INSTALL_MAN} $(MAN5) "$(MANPREFIX)/man5"
-
- uninstall:
-   for f in $(BIN) $(SCR); do rm -f "$(DESTDIR)$(PREFIX)/bin/$$f"; done
diff --git patches/patch-config_mk patches/patch-config_mk
index b27e187cb51..b3bd00fb313 100644
--- patches/patch-config_mk
+++ patches/patch-config_mk
@@ -3,13 +3,7 @@ $OpenBSD: patch-config_mk,v 1.1.1.1 2017/10/23 21:39:20 
bcallah Exp $

Index: config.mk
--- config.mk.orig
+++ config.mk
-@@ -4,15 +4,15 @@ VERSION = 3
- # Customize below to fit your system
-
- # paths
--PREFIX = /usr/local
-+PREFIX ?= /usr/local
- MANPREFIX = ${PREFIX}/man
+@@ -9,10 +9,10 @@ MANPREFIX = $(PREFIX)/share/man

 # flags
 CPPFLAGS = -D_DEFAULT_SOURCE
@@ -17,8 +11,8 @@ Index: config.mk
-LDFLAGS  = -s
+CFLAGS   += -std=c99 -pedantic -Wall -Wextra -I${LOCALBASE}/include
+LDFLAGS  += -s -L${LOCALBASE}/lib
- PNG-LDFLAGS = -lpng
- JPG-LDFLAGS = -ljpeg
+ PNG-LDLIBS = -lpng
+ JPG-LDLIBS = -ljpeg

 # compiler and linker
-CC = cc






Re: UPDATE: graphics/farbfeld 3 -> 4

2018-04-28 Thread Kaashif Hymabaccus
On Sat, Apr 28, 2018 at 03:11:08PM +0100, Stuart Henderson wrote:
> Please don't rely on the cc wrapper. It's a hack for certain situations.
> Also it's easier to verify that a port does the right thing if CC is
> passed correctly.

OK, here is a diff that leaves the CC stuff as it was, passed in
MAKE_ENV and config.mk is patched with ?= so it gets picked up.

diff --git Makefile Makefile
index 8d499d1ad33..7a0cc01f58c 100644
--- Makefile
+++ Makefile
@@ -1,7 +1,7 @@
 # $OpenBSD: Makefile,v 1.1.1.1 2017/10/23 21:39:20 bcallah Exp $
 
 COMMENT =  lossless, uncompressed graphics format
-DISTNAME = farbfeld-3
+DISTNAME = farbfeld-4
 CATEGORIES =   graphics converters
 
 HOMEPAGE = https://tools.suckless.org/farbfeld
@@ -19,9 +19,16 @@ LIB_DEPENDS =graphics/png \
 
 RUN_DEPENDS =  graphics/ImageMagick
 
-USE_GMAKE =Yes
 MAKE_ENV = CC="${CC}"
 
 NO_TEST =  Yes
 
+do-install:
+   ${INSTALL_PROGRAM} \
+   ${WRKBUILD}/{ff2jpg,ff2pam,ff2png,ff2ppm,jpg2ff,png2ff} \
+   ${PREFIX}/bin/
+   ${INSTALL_SCRIPT} ${WRKSRC}/2ff ${PREFIX}/bin/
+   ${INSTALL_MAN} ${WRKSRC}/*.1 ${PREFIX}/man/man1/
+   ${INSTALL_MAN} ${WRKSRC}/*.5 ${PREFIX}/man/man5/
+
 .include 
diff --git distinfo distinfo
index c632a202e9e..a5f2d6668be 100644
--- distinfo
+++ distinfo
@@ -1,2 +1,2 @@
-SHA256 (farbfeld-3.tar.gz) = W5U7hqctP+rt9iaYUyyIiOX24vY2MZOkzIzuDjjDeK0=
-SIZE (farbfeld-3.tar.gz) = 10169
+SHA256 (farbfeld-4.tar.gz) = x99ZIe3RIcpdWxz2+wHkMK/5sxJCJi5PaQ069yzL5yo=
+SIZE (farbfeld-4.tar.gz) = 10340
diff --git patches/patch-Makefile patches/patch-Makefile
deleted file mode 100644
index c42275f1f20..000
--- patches/patch-Makefile
+++ /dev/null
@@ -1,27 +0,0 @@
-$OpenBSD: patch-Makefile,v 1.1.1.1 2017/10/23 21:39:20 bcallah Exp $
-
-Index: Makefile
 Makefile.orig
-+++ Makefile
-@@ -38,15 +38,12 @@ dist:
-   rm -rf "farbfeld-$(VERSION)"
- 
- install: all
--  mkdir -p "$(DESTDIR)$(PREFIX)/bin"
--  cp -f $(SCR) $(BIN) "$(DESTDIR)$(PREFIX)/bin"
--  for f in $(BIN) $(SCR); do chmod 755 "$(DESTDIR)$(PREFIX)/bin/$$f"; done
--  mkdir -p "$(DESTDIR)$(MANPREFIX)/man1"
--  cp -f $(MAN1) "$(DESTDIR)$(MANPREFIX)/man1"
--  for m in $(MAN1); do chmod 644 "$(DESTDIR)$(MANPREFIX)/man1/$$m"; done
--  mkdir -p "$(DESTDIR)$(MANPREFIX)/man5"
--  cp -f $(MAN5) "$(DESTDIR)$(MANPREFIX)/man5"
--  for m in $(MAN5); do chmod 644 "$(DESTDIR)$(MANPREFIX)/man5/$$m"; done
-+  ${BSD_INSTALL_PROGRAM_DIR} "$(PREFIX)/bin"
-+  ${BSD_INSTALL_PROGRAM} $(SCR) $(BIN) "$(PREFIX)/bin"
-+  ${BSD_INSTALL_MAN_DIR} "$(MANPREFIX)/man1"
-+  ${BSD_INSTALL_MAN} $(MAN1) "$(MANPREFIX)/man1"
-+  ${BSD_INSTALL_MAN_DIR} "$(MANPREFIX)/man5"
-+  ${BSD_INSTALL_MAN} $(MAN5) "$(MANPREFIX)/man5"
- 
- uninstall:
-   for f in $(BIN) $(SCR); do rm -f "$(DESTDIR)$(PREFIX)/bin/$$f"; done
diff --git patches/patch-config_mk patches/patch-config_mk
index b27e187cb51..b3bd00fb313 100644
--- patches/patch-config_mk
+++ patches/patch-config_mk
@@ -3,13 +3,7 @@ $OpenBSD: patch-config_mk,v 1.1.1.1 2017/10/23 21:39:20 
bcallah Exp $
 Index: config.mk
 --- config.mk.orig
 +++ config.mk
-@@ -4,15 +4,15 @@ VERSION = 3
- # Customize below to fit your system
- 
- # paths
--PREFIX = /usr/local
-+PREFIX ?= /usr/local
- MANPREFIX = ${PREFIX}/man
+@@ -9,10 +9,10 @@ MANPREFIX = $(PREFIX)/share/man
  
  # flags
  CPPFLAGS = -D_DEFAULT_SOURCE
@@ -17,8 +11,8 @@ Index: config.mk
 -LDFLAGS  = -s
 +CFLAGS   += -std=c99 -pedantic -Wall -Wextra -I${LOCALBASE}/include
 +LDFLAGS  += -s -L${LOCALBASE}/lib
- PNG-LDFLAGS = -lpng
- JPG-LDFLAGS = -ljpeg
+ PNG-LDLIBS = -lpng
+ JPG-LDLIBS = -ljpeg
  
  # compiler and linker
 -CC = cc



Re: UPDATE: graphics/farbfeld 3 -> 4

2018-04-28 Thread Stuart Henderson
On 2018/04/28 00:07, Kaashif Hymabaccus wrote:
> On Sat, Apr 14, 2018 at 01:03:09AM +0200, Klemens Nanni wrote:
> >
> > [...]
> >
> > Now that you're rolling your own do-install, this hunk is obsolete.
> >
> > [...]
> > 
> > CC is already passed in MAKE_ENV, this can go, too.
> > 
> 
> Addressed these comments. Also there was a hardcoded -Os in the CFLAGS
> I patched out.
> 
> I took out passing CC in MAKE_ENV since the farbfeld makefile is set
> to use "cc" in config.mk, which is already linked to the right
> compiler so there's no need to fix it.

Please don't rely on the cc wrapper. It's a hack for certain situations.
Also it's easier to verify that a port does the right thing if CC is
passed correctly.



Re: UPDATE: graphics/farbfeld 3 -> 4

2018-04-28 Thread Solene Rapenne

Klemens Nanni writes:

> On Sat, Apr 28, 2018 at 12:07:14AM +0100, Kaashif Hymabaccus wrote:
>> On Sat, Apr 14, 2018 at 01:03:09AM +0200, Klemens Nanni wrote:
>> >
>> > [...]
>> >
>> > Now that you're rolling your own do-install, this hunk is obsolete.
>> >
>> > [...]
>> > 
>> > CC is already passed in MAKE_ENV, this can go, too.
>> > 
>> 
>> Addressed these comments. Also there was a hardcoded -Os in the CFLAGS
>> I patched out.
>> 
>> I took out passing CC in MAKE_ENV since the farbfeld makefile is set
>> to use "cc" in config.mk, which is already linked to the right
>> compiler so there's no need to fix it.
> Looks all good to me.
>
> Any OKs to commit this?

looks good to me
ok solene@



Re: UPDATE: graphics/farbfeld 3 -> 4

2018-04-28 Thread Klemens Nanni
On Sat, Apr 28, 2018 at 12:07:14AM +0100, Kaashif Hymabaccus wrote:
> On Sat, Apr 14, 2018 at 01:03:09AM +0200, Klemens Nanni wrote:
> >
> > [...]
> >
> > Now that you're rolling your own do-install, this hunk is obsolete.
> >
> > [...]
> > 
> > CC is already passed in MAKE_ENV, this can go, too.
> > 
> 
> Addressed these comments. Also there was a hardcoded -Os in the CFLAGS
> I patched out.
> 
> I took out passing CC in MAKE_ENV since the farbfeld makefile is set
> to use "cc" in config.mk, which is already linked to the right
> compiler so there's no need to fix it.
Looks all good to me.

Any OKs to commit this?



Re: UPDATE: graphics/farbfeld 3 -> 4

2018-04-27 Thread Kaashif Hymabaccus
On Sat, Apr 14, 2018 at 01:03:09AM +0200, Klemens Nanni wrote:
>
> [...]
>
> Now that you're rolling your own do-install, this hunk is obsolete.
>
> [...]
> 
> CC is already passed in MAKE_ENV, this can go, too.
> 

Addressed these comments. Also there was a hardcoded -Os in the CFLAGS
I patched out.

I took out passing CC in MAKE_ENV since the farbfeld makefile is set
to use "cc" in config.mk, which is already linked to the right
compiler so there's no need to fix it.

-- 
Kaashif Hymabaccus
GPG: 3E810B04

diff --git Makefile Makefile
index 8d499d1ad33..11e30505bbb 100644
--- Makefile
+++ Makefile
@@ -1,7 +1,7 @@
 # $OpenBSD: Makefile,v 1.1.1.1 2017/10/23 21:39:20 bcallah Exp $
 
 COMMENT =  lossless, uncompressed graphics format
-DISTNAME = farbfeld-3
+DISTNAME = farbfeld-4
 CATEGORIES =   graphics converters
 
 HOMEPAGE = https://tools.suckless.org/farbfeld
@@ -19,9 +19,14 @@ LIB_DEPENDS =graphics/png \
 
 RUN_DEPENDS =  graphics/ImageMagick
 
-USE_GMAKE =Yes
-MAKE_ENV = CC="${CC}"
-
 NO_TEST =  Yes
 
+do-install:
+   ${INSTALL_PROGRAM} \
+   ${WRKBUILD}/{ff2jpg,ff2pam,ff2png,ff2ppm,jpg2ff,png2ff} \
+   ${PREFIX}/bin/
+   ${INSTALL_SCRIPT} ${WRKSRC}/2ff ${PREFIX}/bin/
+   ${INSTALL_MAN} ${WRKSRC}/*.1 ${PREFIX}/man/man1/
+   ${INSTALL_MAN} ${WRKSRC}/*.5 ${PREFIX}/man/man5/
+
 .include 
diff --git distinfo distinfo
index c632a202e9e..a5f2d6668be 100644
--- distinfo
+++ distinfo
@@ -1,2 +1,2 @@
-SHA256 (farbfeld-3.tar.gz) = W5U7hqctP+rt9iaYUyyIiOX24vY2MZOkzIzuDjjDeK0=
-SIZE (farbfeld-3.tar.gz) = 10169
+SHA256 (farbfeld-4.tar.gz) = x99ZIe3RIcpdWxz2+wHkMK/5sxJCJi5PaQ069yzL5yo=
+SIZE (farbfeld-4.tar.gz) = 10340
diff --git patches/patch-Makefile patches/patch-Makefile
deleted file mode 100644
index c42275f1f20..000
--- patches/patch-Makefile
+++ /dev/null
@@ -1,27 +0,0 @@
-$OpenBSD: patch-Makefile,v 1.1.1.1 2017/10/23 21:39:20 bcallah Exp $
-
-Index: Makefile
 Makefile.orig
-+++ Makefile
-@@ -38,15 +38,12 @@ dist:
-   rm -rf "farbfeld-$(VERSION)"
- 
- install: all
--  mkdir -p "$(DESTDIR)$(PREFIX)/bin"
--  cp -f $(SCR) $(BIN) "$(DESTDIR)$(PREFIX)/bin"
--  for f in $(BIN) $(SCR); do chmod 755 "$(DESTDIR)$(PREFIX)/bin/$$f"; done
--  mkdir -p "$(DESTDIR)$(MANPREFIX)/man1"
--  cp -f $(MAN1) "$(DESTDIR)$(MANPREFIX)/man1"
--  for m in $(MAN1); do chmod 644 "$(DESTDIR)$(MANPREFIX)/man1/$$m"; done
--  mkdir -p "$(DESTDIR)$(MANPREFIX)/man5"
--  cp -f $(MAN5) "$(DESTDIR)$(MANPREFIX)/man5"
--  for m in $(MAN5); do chmod 644 "$(DESTDIR)$(MANPREFIX)/man5/$$m"; done
-+  ${BSD_INSTALL_PROGRAM_DIR} "$(PREFIX)/bin"
-+  ${BSD_INSTALL_PROGRAM} $(SCR) $(BIN) "$(PREFIX)/bin"
-+  ${BSD_INSTALL_MAN_DIR} "$(MANPREFIX)/man1"
-+  ${BSD_INSTALL_MAN} $(MAN1) "$(MANPREFIX)/man1"
-+  ${BSD_INSTALL_MAN_DIR} "$(MANPREFIX)/man5"
-+  ${BSD_INSTALL_MAN} $(MAN5) "$(MANPREFIX)/man5"
- 
- uninstall:
-   for f in $(BIN) $(SCR); do rm -f "$(DESTDIR)$(PREFIX)/bin/$$f"; done
diff --git patches/patch-config_mk patches/patch-config_mk
index b27e187cb51..d3cac2b452f 100644
--- patches/patch-config_mk
+++ patches/patch-config_mk
@@ -3,13 +3,7 @@ $OpenBSD: patch-config_mk,v 1.1.1.1 2017/10/23 21:39:20 
bcallah Exp $
 Index: config.mk
 --- config.mk.orig
 +++ config.mk
-@@ -4,15 +4,15 @@ VERSION = 3
- # Customize below to fit your system
- 
- # paths
--PREFIX = /usr/local
-+PREFIX ?= /usr/local
- MANPREFIX = ${PREFIX}/man
+@@ -9,8 +9,8 @@ MANPREFIX = $(PREFIX)/share/man
  
  # flags
  CPPFLAGS = -D_DEFAULT_SOURCE
@@ -17,9 +11,6 @@ Index: config.mk
 -LDFLAGS  = -s
 +CFLAGS   += -std=c99 -pedantic -Wall -Wextra -I${LOCALBASE}/include
 +LDFLAGS  += -s -L${LOCALBASE}/lib
- PNG-LDFLAGS = -lpng
- JPG-LDFLAGS = -ljpeg
+ PNG-LDLIBS = -lpng
+ JPG-LDLIBS = -ljpeg
  
- # compiler and linker
--CC = cc
-+CC ?= cc



Re: UPDATE: graphics/farbfeld 3 -> 4

2018-04-13 Thread Klemens Nanni
On Fri, Apr 13, 2018 at 11:09:07PM +0100, Kaashif Hymabaccus wrote:
> On Thu, Apr 12, 2018 at 10:23:56AM +0200, Klemens Nanni wrote:
> > On Thu, Apr 12, 2018 at 01:52:48AM +0100, Kaashif Hymabaccus wrote:
> > > This is an update to graphics/farbfeld. The main change to the port is
> > > that USE_GMAKE isn't needed any more.
> > > 
> > > Works fine for me on amd64 (converted some images to ff and back,
> > > still seems to work).
> > Can you provide a simple do-install and drop patch-Makefile instead?
> > This was recently done for x11/{dmenu,st} as well. This would be
> > reasonably simpler and keep suckless ports somewhat consistent across
> > the tree.
> 
> Thanks for the suggestion, the updated diff is below.
Looks good to me, OK kn with with the following comments fixed.

> diff --git patches/patch-config_mk patches/patch-config_mk
> index b27e187cb51..f660d82096f 100644
> --- patches/patch-config_mk
> +++ patches/patch-config_mk
> @@ -3,13 +3,14 @@ $OpenBSD: patch-config_mk,v 1.1.1.1 2017/10/23 21:39:20 
> bcallah Exp $
>  Index: config.mk
>  --- config.mk.orig
>  +++ config.mk
> -@@ -4,15 +4,15 @@ VERSION = 3
> +@@ -4,15 +4,15 @@ VERSION = 4
>   # Customize below to fit your system
>   
>   # paths
>  -PREFIX = /usr/local
> +-MANPREFIX = $(PREFIX)/share/man
>  +PREFIX ?= /usr/local
> - MANPREFIX = ${PREFIX}/man
> ++MANPREFIX = $(PREFIX)/man
Now that you're rolling your own do-install, this hunk is obsolete.

>   # flags
>   CPPFLAGS = -D_DEFAULT_SOURCE
> @@ -17,8 +18,8 @@ Index: config.mk
>  -LDFLAGS  = -s
>  +CFLAGS   += -std=c99 -pedantic -Wall -Wextra -I${LOCALBASE}/include
>  +LDFLAGS  += -s -L${LOCALBASE}/lib
> - PNG-LDFLAGS = -lpng
> - JPG-LDFLAGS = -ljpeg
> + PNG-LDLIBS = -lpng
> + JPG-LDLIBS = -ljpeg
>   
>   # compiler and linker
>  -CC = cc
CC is already passed in MAKE_ENV, this can go, too.



Re: UPDATE: graphics/farbfeld 3 -> 4

2018-04-13 Thread Kaashif Hymabaccus
On Thu, Apr 12, 2018 at 10:23:56AM +0200, Klemens Nanni wrote:
> On Thu, Apr 12, 2018 at 01:52:48AM +0100, Kaashif Hymabaccus wrote:
> > This is an update to graphics/farbfeld. The main change to the port is
> > that USE_GMAKE isn't needed any more.
> > 
> > Works fine for me on amd64 (converted some images to ff and back,
> > still seems to work).
> Can you provide a simple do-install and drop patch-Makefile instead?
> This was recently done for x11/{dmenu,st} as well. This would be
> reasonably simpler and keep suckless ports somewhat consistent across
> the tree.

Thanks for the suggestion, the updated diff is below.

-- 
Kaashif Hymabaccus
GPG: 3E810B04

diff --git Makefile Makefile
index 8d499d1ad33..7a0cc01f58c 100644
--- Makefile
+++ Makefile
@@ -1,7 +1,7 @@
 # $OpenBSD: Makefile,v 1.1.1.1 2017/10/23 21:39:20 bcallah Exp $
 
 COMMENT =  lossless, uncompressed graphics format
-DISTNAME = farbfeld-3
+DISTNAME = farbfeld-4
 CATEGORIES =   graphics converters
 
 HOMEPAGE = https://tools.suckless.org/farbfeld
@@ -19,9 +19,16 @@ LIB_DEPENDS =graphics/png \
 
 RUN_DEPENDS =  graphics/ImageMagick
 
-USE_GMAKE =Yes
 MAKE_ENV = CC="${CC}"
 
 NO_TEST =  Yes
 
+do-install:
+   ${INSTALL_PROGRAM} \
+   ${WRKBUILD}/{ff2jpg,ff2pam,ff2png,ff2ppm,jpg2ff,png2ff} \
+   ${PREFIX}/bin/
+   ${INSTALL_SCRIPT} ${WRKSRC}/2ff ${PREFIX}/bin/
+   ${INSTALL_MAN} ${WRKSRC}/*.1 ${PREFIX}/man/man1/
+   ${INSTALL_MAN} ${WRKSRC}/*.5 ${PREFIX}/man/man5/
+
 .include 
diff --git distinfo distinfo
index c632a202e9e..a5f2d6668be 100644
--- distinfo
+++ distinfo
@@ -1,2 +1,2 @@
-SHA256 (farbfeld-3.tar.gz) = W5U7hqctP+rt9iaYUyyIiOX24vY2MZOkzIzuDjjDeK0=
-SIZE (farbfeld-3.tar.gz) = 10169
+SHA256 (farbfeld-4.tar.gz) = x99ZIe3RIcpdWxz2+wHkMK/5sxJCJi5PaQ069yzL5yo=
+SIZE (farbfeld-4.tar.gz) = 10340
diff --git patches/patch-Makefile patches/patch-Makefile
deleted file mode 100644
index c42275f1f20..000
--- patches/patch-Makefile
+++ /dev/null
@@ -1,27 +0,0 @@
-$OpenBSD: patch-Makefile,v 1.1.1.1 2017/10/23 21:39:20 bcallah Exp $
-
-Index: Makefile
 Makefile.orig
-+++ Makefile
-@@ -38,15 +38,12 @@ dist:
-   rm -rf "farbfeld-$(VERSION)"
- 
- install: all
--  mkdir -p "$(DESTDIR)$(PREFIX)/bin"
--  cp -f $(SCR) $(BIN) "$(DESTDIR)$(PREFIX)/bin"
--  for f in $(BIN) $(SCR); do chmod 755 "$(DESTDIR)$(PREFIX)/bin/$$f"; done
--  mkdir -p "$(DESTDIR)$(MANPREFIX)/man1"
--  cp -f $(MAN1) "$(DESTDIR)$(MANPREFIX)/man1"
--  for m in $(MAN1); do chmod 644 "$(DESTDIR)$(MANPREFIX)/man1/$$m"; done
--  mkdir -p "$(DESTDIR)$(MANPREFIX)/man5"
--  cp -f $(MAN5) "$(DESTDIR)$(MANPREFIX)/man5"
--  for m in $(MAN5); do chmod 644 "$(DESTDIR)$(MANPREFIX)/man5/$$m"; done
-+  ${BSD_INSTALL_PROGRAM_DIR} "$(PREFIX)/bin"
-+  ${BSD_INSTALL_PROGRAM} $(SCR) $(BIN) "$(PREFIX)/bin"
-+  ${BSD_INSTALL_MAN_DIR} "$(MANPREFIX)/man1"
-+  ${BSD_INSTALL_MAN} $(MAN1) "$(MANPREFIX)/man1"
-+  ${BSD_INSTALL_MAN_DIR} "$(MANPREFIX)/man5"
-+  ${BSD_INSTALL_MAN} $(MAN5) "$(MANPREFIX)/man5"
- 
- uninstall:
-   for f in $(BIN) $(SCR); do rm -f "$(DESTDIR)$(PREFIX)/bin/$$f"; done
diff --git patches/patch-config_mk patches/patch-config_mk
index b27e187cb51..f660d82096f 100644
--- patches/patch-config_mk
+++ patches/patch-config_mk
@@ -3,13 +3,14 @@ $OpenBSD: patch-config_mk,v 1.1.1.1 2017/10/23 21:39:20 
bcallah Exp $
 Index: config.mk
 --- config.mk.orig
 +++ config.mk
-@@ -4,15 +4,15 @@ VERSION = 3
+@@ -4,15 +4,15 @@ VERSION = 4
  # Customize below to fit your system
  
  # paths
 -PREFIX = /usr/local
+-MANPREFIX = $(PREFIX)/share/man
 +PREFIX ?= /usr/local
- MANPREFIX = ${PREFIX}/man
++MANPREFIX = $(PREFIX)/man
  
  # flags
  CPPFLAGS = -D_DEFAULT_SOURCE
@@ -17,8 +18,8 @@ Index: config.mk
 -LDFLAGS  = -s
 +CFLAGS   += -std=c99 -pedantic -Wall -Wextra -I${LOCALBASE}/include
 +LDFLAGS  += -s -L${LOCALBASE}/lib
- PNG-LDFLAGS = -lpng
- JPG-LDFLAGS = -ljpeg
+ PNG-LDLIBS = -lpng
+ JPG-LDLIBS = -ljpeg
  
  # compiler and linker
 -CC = cc



Re: UPDATE: graphics/farbfeld 3 -> 4

2018-04-12 Thread Klemens Nanni
On Thu, Apr 12, 2018 at 01:52:48AM +0100, Kaashif Hymabaccus wrote:
> This is an update to graphics/farbfeld. The main change to the port is
> that USE_GMAKE isn't needed any more.
> 
> Works fine for me on amd64 (converted some images to ff and back,
> still seems to work).
Can you provide a simple do-install and drop patch-Makefile instead?
This was recently done for x11/{dmenu,st} as well. This would be
reasonably simpler and keep suckless ports somewhat consistent across
the tree.



UPDATE: graphics/farbfeld 3 -> 4

2018-04-11 Thread Kaashif Hymabaccus
Hello ports@

This is an update to graphics/farbfeld. The main change to the port is
that USE_GMAKE isn't needed any more.

Works fine for me on amd64 (converted some images to ff and back,
still seems to work).

diff --git Makefile Makefile
index 8d499d1ad33..1b49fcc3fa1 100644
--- Makefile
+++ Makefile
@@ -1,7 +1,7 @@
 # $OpenBSD: Makefile,v 1.1.1.1 2017/10/23 21:39:20 bcallah Exp $
 
 COMMENT =  lossless, uncompressed graphics format
-DISTNAME = farbfeld-3
+DISTNAME = farbfeld-4
 CATEGORIES =   graphics converters
 
 HOMEPAGE = https://tools.suckless.org/farbfeld
@@ -19,7 +19,6 @@ LIB_DEPENDS = graphics/png \
 
 RUN_DEPENDS =  graphics/ImageMagick
 
-USE_GMAKE =Yes
 MAKE_ENV = CC="${CC}"
 
 NO_TEST =  Yes
diff --git distinfo distinfo
index c632a202e9e..a5f2d6668be 100644
--- distinfo
+++ distinfo
@@ -1,2 +1,2 @@
-SHA256 (farbfeld-3.tar.gz) = W5U7hqctP+rt9iaYUyyIiOX24vY2MZOkzIzuDjjDeK0=
-SIZE (farbfeld-3.tar.gz) = 10169
+SHA256 (farbfeld-4.tar.gz) = x99ZIe3RIcpdWxz2+wHkMK/5sxJCJi5PaQ069yzL5yo=
+SIZE (farbfeld-4.tar.gz) = 10340
diff --git patches/patch-Makefile patches/patch-Makefile
index c42275f1f20..bb3b6daad0e 100644
--- patches/patch-Makefile
+++ patches/patch-Makefile
@@ -3,7 +3,7 @@ $OpenBSD: patch-Makefile,v 1.1.1.1 2017/10/23 21:39:20 bcallah 
Exp $
 Index: Makefile
 --- Makefile.orig
 +++ Makefile
-@@ -38,15 +38,12 @@ dist:
+@@ -51,15 +51,12 @@ dist:
rm -rf "farbfeld-$(VERSION)"
  
  install: all
diff --git patches/patch-config_mk patches/patch-config_mk
index b27e187cb51..f660d82096f 100644
--- patches/patch-config_mk
+++ patches/patch-config_mk
@@ -3,13 +3,14 @@ $OpenBSD: patch-config_mk,v 1.1.1.1 2017/10/23 21:39:20 
bcallah Exp $
 Index: config.mk
 --- config.mk.orig
 +++ config.mk
-@@ -4,15 +4,15 @@ VERSION = 3
+@@ -4,15 +4,15 @@ VERSION = 4
  # Customize below to fit your system
  
  # paths
 -PREFIX = /usr/local
+-MANPREFIX = $(PREFIX)/share/man
 +PREFIX ?= /usr/local
- MANPREFIX = ${PREFIX}/man
++MANPREFIX = $(PREFIX)/man
  
  # flags
  CPPFLAGS = -D_DEFAULT_SOURCE
@@ -17,8 +18,8 @@ Index: config.mk
 -LDFLAGS  = -s
 +CFLAGS   += -std=c99 -pedantic -Wall -Wextra -I${LOCALBASE}/include
 +LDFLAGS  += -s -L${LOCALBASE}/lib
- PNG-LDFLAGS = -lpng
- JPG-LDFLAGS = -ljpeg
+ PNG-LDLIBS = -lpng
+ JPG-LDLIBS = -ljpeg
  
  # compiler and linker
 -CC = cc