sthen 25f0e460f2 Add COMPILER lines to c++ ports which currently use the default. Adjust
some existing COMPILER lines with arch restrictions etc. In the usual
case this is now using "COMPILER = base-clang ports-gcc base-gcc" on
ports with c++ libraries in WANTLIB.

This is basically intended to be a noop on architectures using clang
as the system compiler, but help with other architectures where we
currently have many ports knocked out due to building with an unsuitable
compiler -

- some ports require c++11/newer so the GCC version in base that is used
on these archirtectures is too old.

- some ports have conflicts where an executable is built with one compiler
(e.g. gcc from base) but a library dependency is built with a different
one (e.g. gcc from ports), resulted in mixing incompatible libraries in the
same address space.

devel/gmp is intentionally skipped as it's on the path to building gcc -
the c++ library there is unused in ports (and not built by default upstream)
so intending to disable building gmpcxx in a future commit.
2018-10-24 14:27:57 +00:00

77 lines
2.1 KiB
Makefile

# $OpenBSD: Makefile,v 1.57 2018/10/24 14:28:05 sthen Exp $
COMMENT= image processing tools with stable ABI
DISTNAME= GraphicsMagick-1.3.30
CATEGORIES= graphics devel
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=graphicsmagick/}
EXTRACT_SUFX= .tar.xz
REVISION= 0
SHARED_LIBS= GraphicsMagick 7.0 \
GraphicsMagick++ 5.2 \
GraphicsMagickWand 4.0 \
HOMEPAGE= http://www.graphicsmagick.org/
MAINTAINER= Brad Smith <brad@comstyle.com>
# http://www.graphicsmagick.org/www/Copyright.html
PERMIT_PACKAGE_CDROM= Yes
WANTLIB += ${COMPILER_LIBCXX} ICE SM X11 Xau Xdmcp Xext bz2 c
WANTLIB += freetype iconv jasper jbig jpeg lcms2 ltdl lzma m png16
WANTLIB += tiff webp webpmux wmflite-0.2 xcb xml2 z
WANTLIB += perl # uses perl ABI
COMPILER = base-clang ports-gcc base-gcc
LIB_DEPENDS= archivers/bzip2 \
archivers/xz \
converters/libiconv \
devel/libtool,-ltdl \
graphics/jasper \
graphics/jbigkit \
graphics/lcms2 \
graphics/libwebp \
graphics/libwmf \
graphics/png \
graphics/tiff \
textproc/libxml
RUN_DEPENDS= print/ghostscript/gnu \
print/transfig
BUILD_DEPENDS= ${RUN_DEPENDS}
CONFIGURE_STYLE= gnu
CONFIGURE_ARGS+= --enable-shared \
--with-gs-font-dir=${LOCALBASE}/share/fonts/ghostscript \
--with-ltdl-include=${LOCALBASE}/include \
--with-ltdl-lib=${LOCALBASE}/lib \
--with-modules \
--with-perl \
--with-quantum-depth=16 \
--without-dps \
--without-fpx \
--without-gslib \
--without-trio \
--disable-ltdl-install \
--disable-openmp
CONFIGURE_ENV+= CPPFLAGS="-I${LOCALBASE}/include" \
LDFLAGS="-L${WRKBUILD}/magick/.libs -L${WRKBUILD}/wand/.libs -L${LOCALBASE}/lib" \
ac_cv_path_LaunchDelegate=no
post-build:
@cd ${WRKBUILD}/PerlMagick && perl Makefile.PL && \
sed -i s,'^LDLOADLIBS = ','LDLOADLIBS = -lGraphicsMagick ', \
Makefile && ${MAKE} ${MAKE_FLAGS}
post-install:
@cd ${WRKBUILD}/PerlMagick && ${MAKE} ${MAKE_FLAGS} ${FAKE_TARGET}
@perl -pi -e s,'-L${WRKBUILD}/(magick|wand)/.libs','',g \
${PREFIX}/bin/GraphicsMagick++-config \
${PREFIX}/bin/GraphicsMagick-config
@find ${PREFIX}/lib/GraphicsMagick/modules-Q16 -name '*.a' -print | xargs rm
.include <bsd.port.mk>