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 <bsd.port.mk> 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..00000000000 --- 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
