View | Details | Raw Unified | Return to bug 184864
Collapse All | Expand All

(-)graphics/apngasm/Makefile (-24 / +14 lines)
Lines 2-51 Link Here
2
# $FreeBSD: head/graphics/apngasm/Makefile 336096 2013-12-10 19:39:46Z nemysis $
2
# $FreeBSD: head/graphics/apngasm/Makefile 336096 2013-12-10 19:39:46Z nemysis $
3
3
4
PORTNAME=	apngasm
4
PORTNAME=	apngasm
5
PORTVERSION=	2.7
5
PORTVERSION=	2.8
6
DISTVERSIONSUFFIX=-src
6
DISTVERSIONSUFFIX=-src
7
CATEGORIES=	graphics
7
CATEGORIES=	graphics
8
MASTER_SITES=	SF/${PORTNAME}/${PORTVERSION}
8
MASTER_SITES=	SF/${PORTNAME}/${PORTVERSION}
9
EXTRACT_SUFX=	.zip
9
10
10
MAINTAINER=	ports@FreeBSD.org
11
MAINTAINER=	ports@FreeBSD.org
11
COMMENT=	Creates an APNG animation from a PNG/TGA image sequence
12
COMMENT=	Create Animated PNG from a sequence of files
12
13
13
LICENSE=	ZLIB
14
LICENSE=	ZLIB
14
15
15
NO_WRKSUBDIR=	yes
16
OPTIONS_DEFINE=	DOCS STATIC
16
17
USE_DOS2UNIX=	yes
18
USE_ZIP=	yes
19
17
20
CPPFLAGS+=	`libpng-config --I_opts`
18
NO_WRKSUBDIR=	yes
21
LDFLAGS+=	`libpng-config --ldflags` -lm -lz
22
19
23
PLIST_FILES=	bin/${PORTNAME}
20
USES=		dos2unix gmake
24
21
25
PORTDOCS=	readme.txt
22
PORTDOCS=	readme.txt
23
PLIST_FILES=	bin/${PORTNAME}
26
24
27
OPTIONS_DEFINE=	DOCS STATIC
28
29
NO_STAGE=	yes
30
.include <bsd.port.options.mk>
25
.include <bsd.port.options.mk>
31
26
32
.if ${PORT_OPTIONS:MSTATIC}
27
.if ${PORT_OPTIONS:MSTATIC}
33
BUILD_DEPENDS+=	${LOCALBASE}/lib/libpng.a:${PORTSDIR}/graphics/png
28
BUILD_DEPENDS+=	${LOCALBASE}/lib/libpng.a:${PORTSDIR}/graphics/png
34
LDFLAGS+=	-static
29
MAKE_ENV+=	STATIC=1
35
.else
30
.else
36
LIB_DEPENDS+=	png15:${PORTSDIR}/graphics/png
31
LIB_DEPENDS+=	libpng15.so:${PORTSDIR}/graphics/png
37
.endif
32
.endif
38
33
39
do-build:
40
	cd ${WRKSRC} && ${CC} ${CFLAGS} ${CPPFLAGS} ${PORTNAME}.c \
41
		-o ${PORTNAME} ${LDFLAGS}
42
43
do-install:
34
do-install:
44
	${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${PREFIX}/bin
35
	(cd ${WRKSRC} && ${INSTALL_PROGRAM} ${PORTNAME} \
45
36
		${STAGEDIR}${PREFIX}/bin)
46
.if ${PORT_OPTIONS:MDOCS}
37
	@${MKDIR} ${STAGEDIR}${DOCSDIR}
47
	${MKDIR} ${DOCSDIR}
38
	(cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} \
48
	${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${DOCSDIR}
39
		${STAGEDIR}${DOCSDIR})
49
.endif
50
40
51
.include <bsd.port.mk>
41
.include <bsd.port.mk>
(-)graphics/apngasm/distinfo (-2 / +2 lines)
Lines 1-2 Link Here
1
SHA256 (apngasm-2.7-src.zip) = af42569666cab268a20a0754191396c9d48f4e01d6e8f93c3ae1164c3c821cc3
1
SHA256 (apngasm-2.8-src.zip) = 47bee31bc149efc5932a87819cc0daea668cf7322eeaed9378c43edbdc9803bc
2
SIZE (apngasm-2.7-src.zip) = 11448
2
SIZE (apngasm-2.8-src.zip) = 568753
(-)graphics/apngasm/files/patch-Makefile (+48 lines)
Line 0 Link Here
1
--- Makefile.orig
2
+++ Makefile
3
@@ -1,10 +1,17 @@
4
 PACKAGE    = apngasm
5
-CC         = gcc
6
+CC        ?= cc
7
+CXX       ?= c++
8
 SRC_DIRS   = . 7z zopfli
9
-CFLAGS     = -Wall -pedantic
10
-CFLAGS_OPT = -O2
11
+CFLAGS    += -Wall -pedantic
12
+CXXFLAGS  += -Wall -pedantic
13
+CPPFLAGS  += $(shell libpng-config --cflags)
14
 CFLAGS_7Z  = -Wno-sign-compare -Wno-reorder -Wno-maybe-uninitialized -Wno-parentheses
15
-LIBS       = -lstdc++ -lm -lpng -lz
16
+ifeq ($(strip $(STATIC)),)
17
+LIBS       = $(shell libpng-config --ldflags)
18
+else
19
+LIBS       = $(shell libpng-config --static --ldflags)
20
+LDFLAGS   += -static
21
+endif
22
 
23
 INCUDE_DIRS := $(addprefix -I./, $(SRC_DIRS))
24
 OBJ_DIRS := $(addprefix obj/, $(SRC_DIRS))
25
@@ -16,19 +23,19 @@
26
 all : $(PACKAGE)
27
 
28
 $(PACKAGE) : objdirs $(OBJECTS)
29
-	$(CC) -o $@ $(OBJECTS) -s $(LIBS)
30
+	$(CXX) -o $@ $(OBJECTS) $(LIBS) $(LDFLAGS)
31
 
32
 objdirs :
33
 	mkdir -p $(OBJ_DIRS)
34
 
35
 obj/%.o : %.cpp
36
-	$(CC) -o $@ -c $< $(INCUDE_DIRS) $(CFLAGS) $(CFLAGS_OPT)
37
+	$(CXX) -o $@ -c $< $(INCUDE_DIRS) $(CXXFLAGS) $(CPPFLAGS)
38
 
39
 obj/%.o : %.c
40
-	$(CC) -o $@ -c $< $(INCUDE_DIRS) $(CFLAGS) $(CFLAGS_OPT)
41
+	$(CC) -o $@ -c $< $(INCUDE_DIRS) $(CFLAGS) $(CPPFLAGS)
42
 
43
 obj/%.o : %.cc
44
-	$(CC) -o $@ -c $< $(INCUDE_DIRS) $(CFLAGS) $(CFLAGS_OPT) $(CFLAGS_7Z)
45
+	$(CXX) -o $@ -c $< $(INCUDE_DIRS) $(CXXFLAGS) $(CPPFLAGS) $(CFLAGS_7Z)
46
 
47
 .PHONY : clean
48

Return to bug 184864