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

(-)graphics/apngasm/Makefile (-1 / +6 lines)
Lines 3-10 Link Here
3
3
4
PORTNAME=	apngasm
4
PORTNAME=	apngasm
5
PORTVERSION=	2.9
5
PORTVERSION=	2.9
6
PORTREVISION=	1
7
DISTVERSIONSUFFIX=-src
6
DISTVERSIONSUFFIX=-src
7
PORTREVISION=	2
8
CATEGORIES=	graphics
8
CATEGORIES=	graphics
9
MASTER_SITES=	SF/${PORTNAME}/${PORTVERSION}
9
MASTER_SITES=	SF/${PORTNAME}/${PORTVERSION}
10
10
Lines 28-33 STATIC_BUILD_DEPENDS= ${LOCALBASE}/lib/libpng.a:${ Link Here
28
STATIC_MAKE_ENV=	STATIC=1
28
STATIC_MAKE_ENV=	STATIC=1
29
STATIC_LIB_DEPENDS_OFF=	libpng.so:${PORTSDIR}/graphics/png
29
STATIC_LIB_DEPENDS_OFF=	libpng.so:${PORTSDIR}/graphics/png
30
30
31
# libzopfli.a is N/A
32
STATIC_LIB_DEPENDS_OFF+=libzopfli.so:${PORTSDIR}/archivers/zopfli
33
STATIC_CPPFLAGS_OFF+=	-I${LOCALBASE}/include/zopfli
34
STATIC_LDFLAGS_OFF+=	-lzopfli
35
31
MAKE_JOBS_UNSAFE=	yes
36
MAKE_JOBS_UNSAFE=	yes
32
37
33
do-install:
38
do-install:
(-)graphics/apngasm/files/patch-Makefile (-4 / +6 lines)
Lines 1-15 Link Here
1
--- ./Makefile.orig	2013-12-18 15:23:41.000000000 -0200
1
--- ./Makefile.orig	2013-12-18 15:23:41.000000000 -0200
2
+++ ./Makefile	2013-12-18 15:23:54.000000000 -0200
2
+++ ./Makefile	2013-12-18 15:23:54.000000000 -0200
3
@@ -1,10 +1,17 @@
3
@@ -1,10 +1,18 @@
4
 PACKAGE    = apngasm
4
 PACKAGE    = apngasm
5
-CC         = gcc
5
-CC         = gcc
6
+CC        ?= cc
6
-SRC_DIRS   = . 7z zopfli
7
+CXX       ?= c++
8
 SRC_DIRS   = . 7z zopfli
9
-CFLAGS     = -Wall -pedantic
7
-CFLAGS     = -Wall -pedantic
10
-CFLAGS_OPT = -O2
8
-CFLAGS_OPT = -O2
11
-CFLAGS_7Z  = -Wno-sign-compare -Wno-reorder -Wno-maybe-uninitialized -Wno-parentheses
9
-CFLAGS_7Z  = -Wno-sign-compare -Wno-reorder -Wno-maybe-uninitialized -Wno-parentheses
12
-LIBS       = -lstdc++ -lm -lpng -lz
10
-LIBS       = -lstdc++ -lm -lpng -lz
11
+CC        ?= cc
12
+CXX       ?= c++
13
+SRC_DIRS   = . 7z
13
+CFLAGS    += -Wall -pedantic
14
+CFLAGS    += -Wall -pedantic
14
+CXXFLAGS  += -Wall -pedantic
15
+CXXFLAGS  += -Wall -pedantic
15
+CPPFLAGS  += $(shell libpng-config --cflags)
16
+CPPFLAGS  += $(shell libpng-config --cflags)
Lines 17-22 Link Here
17
+ifeq ($(strip $(STATIC)),)
18
+ifeq ($(strip $(STATIC)),)
18
+LIBS       = $(shell libpng-config --ldflags)
19
+LIBS       = $(shell libpng-config --ldflags)
19
+else
20
+else
21
+SRC_DIRS  += zopfli
20
+LIBS       = $(shell libpng-config --static --ldflags)
22
+LIBS       = $(shell libpng-config --static --ldflags)
21
+LDFLAGS   += -static
23
+LDFLAGS   += -static
22
+endif
24
+endif

Return to bug 201934