diff --git a/graphics/ocaml-images/Makefile b/graphics/ocaml-images/Makefile index 3c6141de4719..d6405e47b9c0 100644 --- a/graphics/ocaml-images/Makefile +++ b/graphics/ocaml-images/Makefile @@ -1,83 +1,86 @@ # Created by: ijliao PORTNAME= images PORTVERSION= 4.0.1 PORTREVISION= 9 PORTEPOCH= 2 CATEGORIES= graphics MASTER_SITES= https://bitbucket.org/camlspotter/camlimages/get/ PKGNAMEPREFIX= ocaml- DISTNAME= v${PORTVERSION} DIST_SUBDIR= ocaml-images MAINTAINER= michael.grunewald@laposte.net COMMENT= Objective Caml image processing library BUILD_DEPENDS= ${LOCALBASE}/share/aclocal/ocaml.m4:lang/ocaml-autoconf BUILD_DEPENDS+= omake:devel/omake USE_OCAML= yes USE_OCAML_FINDLIB= yes OCAML_PKGDIRS= camlimages OCAML_LDLIBS= ${OCAML_SITELIBDIR}/camlimages OMAKESUBS+= -e s@%%INCLUDESPORTS%%@${LOCALBASE}/include@ OMAKESUBS+= -e s@%%INCLUDESX11%%@${LOCALBASE}/include/X11@ OMAKESUBS+= -e s@%%INCLUDESPNG%%@${LOCALBASE}/include/libpng15@ OMAKESUBS+= -e s@%%LDFLAGSPORTS%%@-L${LOCALBASE}/lib@ OMAKE= omake 'PREFIX=${STAGEDIR}${PREFIX}' OMARGS= --dotomake .omake --force-dotomake WRKSRC= ${WRKDIR}/camlspotter-camlimages-c803efa9d5d3 MAKE_JOBS_UNSAFE= yes OPTIONS_DEFINE= PNG JPEG TIFF XPM GIF FREETYPE GHOSTSCRIPT GTK2 DOCS OPTIONS_DEFAULT=PNG JPEG TIFF XPM GIF FREETYPE GHOSTSCRIPT OPTIONS_SUB= yes PNG_CONFIGURE_WITH= png PNG_LIB_DEPENDS= libpng.so:graphics/png JPEG_CONFIGURE_WITH= jpeg JPEG_USES= jpeg TIFF_CONFIGURE_WITH= tiff TIFF_LIB_DEPENDS= libtiff.so:graphics/tiff XPM_CONFIGURE_WITH= xpm GIF_CONFIGURE_WITH= gif GIF_LIB_DEPENDS= libgif.so:graphics/giflib +FREETYPE_USES= pkgconfig FREETYPE_CONFIGURE_WITH=freetype FREETYPE_LIB_DEPENDS= libttf.so:print/freetype \ libfreetype.so:print/freetype2 GHOSTSCRIPT_CONFIGURE_WITH= gs GHOSTSCRIPT_USES= ghostscript GTK2_CONFIGURE_WITH= liblgtk2 GTK2_BUILD_DEPENDS= lablgtk2:x11-toolkits/ocaml-lablgtk2 GTK2_RUN_DEPENDS= lablgtk2:x11-toolkits/ocaml-lablgtk2 +BINARY_ALIAS= freetype-config=true + .include .if ${PORT_OPTIONS:MXPM} USES+= xorg USE_XORG= xpm .endif do-configure: @(cd ${WRKSRC} && ${REINPLACE_CMD} ${OMAKESUBS} OMakefile) (cd ${WRKSRC} && ${OMAKE} ${OMARGS} configure) do-build: (cd ${WRKSRC} && ${OMAKE} ${OMARGS}) do-install: @${MKDIR} ${STAGEDIR}${PREFIX}/${OCAML_LDLIBS} (cd ${WRKSRC} && ${OMAKE} ${OMARGS} install) .include diff --git a/graphics/ocaml-images/files/patch-OMakefile b/graphics/ocaml-images/files/patch-OMakefile index 469d16c417d5..3fe0f16e9845 100644 --- a/graphics/ocaml-images/files/patch-OMakefile +++ b/graphics/ocaml-images/files/patch-OMakefile @@ -1,20 +1,37 @@ ---- OMakefile.orig 2012-11-07 22:03:19.000000000 +0100 -+++ OMakefile 2012-11-07 22:04:26.000000000 +0100 -@@ -22,13 +22,13 @@ +--- OMakefile.orig 2011-06-22 18:04:32 UTC ++++ OMakefile +@@ -22,13 +22,13 @@ if $(defined WithOMyApt) # Specify non standard include directories INCLUDES[]= - /usr/include/X11 - /usr/local/include + %%INCLUDESPORTS%% + %%INCLUDESX11%% + %%INCLUDESPNG%% # Specify non standard library directories LDFLAGS[]+= -# for example, -# LDFLAGS[]+= -L/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/ + %%LDFLAGSPORTS%% # Specify directories where X's rgb.txt can be found PATH_RGB_TXT[]= +@@ -175,13 +175,13 @@ print_configured() = + OCAMLPACKS+=graphics + export + +- SUPPORT_FREETYPE = $(Check_prog_in_path freetype-config) ++ SUPPORT_FREETYPE = $(Check_prog_in_path pkg-config) + PATH_FREETYPE_CONFIG = $(WHERE) + LDFLAGS_freetype= + if $(SUPPORT_FREETYPE) + println(SUPPORT_FREETYPE=$(SUPPORT_FREETYPE)!) +- CFLAGS= $(CFLAGS) $(shell freetype-config --cflags) +- LDFLAGS_freetype= $(shell freetype-config --libs) ++ CFLAGS= $(CFLAGS) $(shell pkg-config freetype2 --cflags) ++ LDFLAGS_freetype= $(shell pkg-config freetype2 --libs) + export + if $(SUPPORT_FREETYPE) + SUPPORTED_NON_FORMATS+=freetype diff --git a/graphics/ocaml-images/files/patch-configure b/graphics/ocaml-images/files/patch-configure new file mode 100644 index 000000000000..224ee1fca92e --- /dev/null +++ b/graphics/ocaml-images/files/patch-configure @@ -0,0 +1,13 @@ +--- configure.orig 2021-08-07 07:17:08 UTC ++++ configure +@@ -8108,8 +8108,8 @@ fi + + + if test -n "$FREETYPE_CONFIG"; then +- LIBFREETYPE=`freetype-config --libs` +- INCFREETYPE=`freetype-config --cflags` ++ LIBFREETYPE=`pkg-config freetype2 --libs` ++ INCFREETYPE=`pkg-config freetype2 --cflags` + SUPPORT_FREETYPE="true" + fi + fi