aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoramdmi3 <amdmi3@FreeBSD.org>2017-12-01 21:44:11 +0800
committeramdmi3 <amdmi3@FreeBSD.org>2017-12-01 21:44:11 +0800
commita7310f5f9e5389fa416634db8b0945edefc10947 (patch)
tree353756881d9104029c37a066e47c097a8d73ea16
parent8d65492fdfcef4f651608cacf2b041bc12ad74ff (diff)
downloadfreebsd-ports-gnome-a7310f5f9e5389fa416634db8b0945edefc10947.tar.gz
freebsd-ports-gnome-a7310f5f9e5389fa416634db8b0945edefc10947.tar.zst
freebsd-ports-gnome-a7310f5f9e5389fa416634db8b0945edefc10947.zip
- Add LICENSE_FILE
- Pet portlint - Switch to options helpers - Simplify STAGEDIR handling Approved by: portmgr blanket
-rw-r--r--devel/erlang-esdl/Makefile35
-rw-r--r--devel/erlang-esdl/files/patch-Makefile4
2 files changed, 14 insertions, 25 deletions
diff --git a/devel/erlang-esdl/Makefile b/devel/erlang-esdl/Makefile
index 897daa5fa767..58535af06076 100644
--- a/devel/erlang-esdl/Makefile
+++ b/devel/erlang-esdl/Makefile
@@ -4,14 +4,17 @@ PORTNAME= esdl
PORTVERSION= 1.0.1
PORTREVISION= 13
CATEGORIES= devel
-PKGNAMEPREFIX= erlang-
MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/${PORTNAME}-${PORTVERSION}
+PKGNAMEPREFIX= erlang-
DISTNAME= ${PORTNAME}-${PORTVERSION}.src
DIST_SUBDIR= erlang
MAINTAINER= olgeni@FreeBSD.org
COMMENT= Library for accessing SDL and OpenGL through Erlang
+LICENSE= MIT
+LICENSE_FILE= ${WRKSRC}/license.terms
+
BUILD_DEPENDS= erl:lang/erlang
RUN_DEPENDS:= ${BUILD_DEPENDS}
@@ -23,39 +26,25 @@ USE_GL= gl glu
USE_SDL= sdl
ALL_TARGET= target
PLIST_SUB= VERSION="${PORTVERSION}"
-MAKE_ENV+= STAGEDIR="${STAGEDIR}"
OPTIONS_DEFINE= SDL_TTF SDL_IMAGE
OPTIONS_DEFAULT=SDL_TTF SDL_IMAGE
+OPTIONS_SUB= yes
SDL_TTF_DESC= SDL_ttf support
+SDL_TTF_USE= SDL=ttf
SDL_IMAGE_DESC= SDL_image support
-
-.include <bsd.port.pre.mk>
-
-.if ${PORT_OPTIONS:MSDL_TTF}
-USE_SDL+= ttf
-PLIST_SUB+= SDL_TTF=""
-.else
-PLIST_SUB+= SDL_TTF="@comment "
-.endif
-
-.if ${PORT_OPTIONS:MSDL_IMAGE}
-USE_SDL+= image
-PLIST_SUB+= SDL_IMAGE=""
-.else
-PLIST_SUB+= SDL_IMAGE="@comment "
-.endif
+SDL_IMAGE_USE= SDL=image
post-patch:
@${REINPLACE_CMD} -Ee 's|addons|lib|' ${WRKSRC}/Makefile
-.if ${PORT_OPTIONS:MSDL_TTF}
+
+post-patch-SDL_TTF-on:
@${REINPLACE_CMD} -e '/ENABLE_SDL_TTF = / s|no|yes|' ${WRKSRC}/Makefile
-.endif
-.if ${PORT_OPTIONS:MSDL_IMAGE}
+
+post-patch-SDL_IMAGE-on:
@${REINPLACE_CMD} -e '/ENABLE_SDL_IMAGE = / s|no|yes|' ${WRKSRC}/Makefile
-.endif
post-install:
@${LN} -sf ${PORTNAME}-${PORTVERSION} ${STAGEDIR}${PREFIX}/lib/erlang/lib/${PORTNAME}
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff --git a/devel/erlang-esdl/files/patch-Makefile b/devel/erlang-esdl/files/patch-Makefile
index 32a753ec33cf..eb33215d4d19 100644
--- a/devel/erlang-esdl/files/patch-Makefile
+++ b/devel/erlang-esdl/files/patch-Makefile
@@ -5,10 +5,10 @@
ifeq ($(INSTALL_DIR), )
-INSTALLDIR = $(ERL_DIR)/addons/$(ESDL_VSN)
-+INSTALLDIR = $(STAGEDIR)$(ERL_DIR)/addons/$(ESDL_VSN)
++INSTALLDIR = $(DESTDIR)$(ERL_DIR)/addons/$(ESDL_VSN)
else
-INSTALLDIR = $(INSTALL_DIR)/$(ESDL_VSN)
-+INSTALLDIR = $(STAGEDIR)$(INSTALL_DIR)/$(ESDL_VSN)
++INSTALLDIR = $(DESTDIR)$(INSTALL_DIR)/$(ESDL_VSN)
endif
## I assume that make install are only made on unixes... :-)