Bug 171295 - [PATCH] print/splix: Remove hardcoded gcc/g++ in Makefile
Summary: [PATCH] print/splix: Remove hardcoded gcc/g++ in Makefile
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Alex Kozlov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-03 22:10 UTC by christian.mangin
Modified: 2012-09-13 21:46 UTC (History)
0 users

See Also:


Attachments
splix.diff (1.65 KB, patch)
2012-09-03 22:10 UTC, christian.mangin
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description christian.mangin 2012-09-03 22:10:10 UTC
This port has a hardcoded dependency on gcc/g++ in its Makefile and won't
honor $CC and $CXX.

Fix: Patch attached:
Comment 1 Alex Kozlov freebsd_committer freebsd_triage 2012-09-13 12:22:28 UTC
Responsible Changed
From-To: freebsd-ports-bugs->ak

I'll take it.
Comment 2 dfilter service freebsd_committer freebsd_triage 2012-09-13 20:55:19 UTC
Author: ak
Date: Thu Sep 13 19:54:52 2012
New Revision: 304229
URL: http://svn.freebsd.org/changeset/ports/304229

Log:
  - Remove indefinite article from COMMENT
  - Convert to new options framework
  - Remove hardcoded CC/CXX [1]
  
  PR:	171295 [1]
  Submitted by:	Christian Mangin <christian.mangin@gmail.com> [1]

Modified:
  head/print/splix/Makefile   (contents, props changed)

Modified: head/print/splix/Makefile
==============================================================================
--- head/print/splix/Makefile	Thu Sep 13 19:33:38 2012	(r304228)
+++ head/print/splix/Makefile	Thu Sep 13 19:54:52 2012	(r304229)
@@ -1,9 +1,4 @@
-# Ports collection makefile for:	splix
-# Date created:				2007-03-30
-# Whom:					Tomas Verbaitis <tomasv@megalogika.lt>
-#
 # $FreeBSD$
-#
 
 PORTNAME=	splix
 PORTVERSION=	2.0.0
@@ -12,9 +7,8 @@ CATEGORIES?=	print
 MASTER_SITES=	SF
 
 MAINTAINER=	ports@FreeBSD.org
-COMMENT=	A set of CUPS printer drivers for Samsung Printer Language printers
+COMMENT=	CUPS printer drivers for Samsung Printer Language printers
 
-LIB_DEPENDS=
 BUILD_DEPENDS=	cups-config:${PORTSDIR}/print/cups-base
 RUN_DEPENDS:=	${BUILD_DEPENDS}
 
@@ -43,29 +37,29 @@ DEST_DIR_DELL=	${CUPS_DATA_DIR}/model/de
 DEST_DIR_SAMSUNG=	${CUPS_DATA_DIR}/model/samsung
 DEST_DIR_XEROX=	${CUPS_DATA_DIR}/model/xerox
 
-THREADS=	2
-WITH_THREADS=	1
-
-OPTIONS=	JBIG "Enable use of JBIG algorithm (pattented)" on \
-		BLACKOPTIM "Enable black correction algorithm" on \
+OPTIONS_DEFINE=	JBIG BLACKOPTIM
+JBIG_DESC=	Enable use of JBIG algorithm (pattented)
+BLACKOPTIM_DESC=	Enable black correction algorithm
+OPTIONS_DEFAULT=	JBIG BLACKOPTIM
 
 .include "bsd.port.options.mk"
 
-.include "bsd.port.pre.mk"
+post-patch:
+	@${REINPLACE_CMD} -e '/^CC.*:= gcc/d' -e '/^CXX.*:= g++/d' \
+		-e 's/make/gmake/' ${WRKSRC}/Makefile
+	@${REINPLACE_CMD} -e 's/g++/$$(CXX)/' ${WRKSRC}/rules.mk
 
 post-configure:
 
-.if !defined(WITHOUT_JBIG)
+.if ${PORT_OPTIONS:MJBIG}
 PPD_SAMSUNG+=	${PPD_SAMSUNG_JBIG}
 PPD_XEROX+=	${PPD_XEROX_JBIG}
-LIB_DEPENDS=	jbig:${PORTSDIR}/graphics/jbigkit
-.endif
-
-.if defined(WITHOUT_JBIG)
+LIB_DEPENDS+=	jbig:${PORTSDIR}/graphics/jbigkit
+.else
 MAKE_ARGS+=	DISABLE_JBIG=1
 .endif
 
-.if defined(WITHOUT_BLACKOPTIM)
+.if empty(PORT_OPTIONS:MBLACKOPTIM)
 MAKE_ARGS+=	DISABLE_BLACKOPTIM=1
 .endif
 
@@ -85,4 +79,4 @@ do-install:
 	${INSTALL_PROGRAM} ${WRKSRC}/optimized/${FILTER} ${BIN_DEST_DIR}
 .endfor
 
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 3 Alex Kozlov freebsd_committer freebsd_triage 2012-09-13 21:46:17 UTC
State Changed
From-To: open->closed

Committed. Thanks!