- Support CC/CFLAGS properly

PR:		57288
Submitted by:	Ports Fury
This commit is contained in:
Kirill Ponomarev 2003-09-27 15:18:24 +00:00
parent e028bdafc4
commit 03d47df143
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=89548
2 changed files with 22 additions and 75 deletions

View file

@ -7,6 +7,7 @@
PORTNAME= XawPlus
PORTVERSION= 3.1.0
PORTREVISION= 1
CATEGORIES= x11-toolkits
MASTER_SITES= http://people.freenet.de/kra/XawPlus/
DISTNAME= ${PORTNAME:L}-${PORTVERSION}
@ -15,27 +16,33 @@ EXTRACT_SUFX= .tgz
MAINTAINER= ports@FreeBSD.org
COMMENT= A replacement for Xaw with a nicer 3-D look and some extensions
USE_X_PREFIX= yes
USE_REINPLACE= yes
INSTALLS_SHLIB= yes
LDCONFIG_DIRS= %%X11BASE%%/lib
WRKSRC= ${WRKDIR}/${PORTNAME}
USE_X_PREFIX= yes
USE_REINPLACE= yes
MAKE_ARGS= CC="${CC}" FLAGS="${CFLAGS} -fPIC -DHAS_WCHAR_H" \
INC_PATH="-I. -I${X11BASE}/include" LIB_PATH="-L${X11BASE}/lib"
ALL_TARGET= lib
INSTALLS_SHLIB= yes
post-patch:
@cd ${WRKSRC} && ${FIND} . -name '*.orig' -delete
@${REINPLACE_CMD} -e 's:so\.3\..:so.3:' ${WRKSRC}/Makefile
@${REINPLACE_CMD} -e 's:%%X11BASE%%:${X11BASE}:' ${WRKSRC}/test/Makefile
do-configure:
${REINPLACE_CMD} -e 's:%%X11BASE%%:${X11BASE}:' ${WRKSRC}/test/Makefile
-@${RM} -f ${WRKSRC}/test/Makefile.bak
post-install:
do-install:
@${MKDIR} ${PREFIX}/include/X11/XawPlus
${INSTALL_DATA} ${WRKSRC}/X11/XawPlus/*.h ${PREFIX}/include/X11/XawPlus
${INSTALL_DATA} ${WRKSRC}/libXawPlus.a ${PREFIX}/lib
${INSTALL_DATA} ${WRKSRC}/libXawPlus.so.3 ${PREFIX}/lib
${LN} -sf libXawPlus.so.3 ${PREFIX}/lib/libXawPlus.so
.if !defined(NOPORTDOCS)
${MKDIR} ${DOCSDIR}
@${MKDIR} ${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/doc/* ${DOCSDIR}
${MKDIR} ${EXAMPLESDIR}
${INSTALL_DATA} ${WRKSRC}/test/* ${EXAMPLESDIR}
${INSTALL_DATA} ${WRKSRC}/doc/*.html ${DOCSDIR}
@${MKDIR} ${EXAMPLESDIR}
${INSTALL_DATA} ${WRKSRC}/test/Makefile ${EXAMPLESDIR}
${INSTALL_DATA} ${WRKSRC}/test/*.c ${EXAMPLESDIR}
${INSTALL_DATA} ${WRKSRC}/test/*.xpm ${EXAMPLESDIR}
.endif
.include <bsd.port.mk>

View file

@ -1,60 +0,0 @@
$FreeBSD$
--- Makefile.orig Sat Sep 7 12:59:26 2002
+++ Makefile Wed Jan 29 17:09:14 2003
@@ -22,9 +22,9 @@
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
-LIB_PATH = -L/usr/X11/lib # Libraries for X
-INC_PATH = -I. -I/usr/X11/include # Header files for X
-INST_LIBS= /usr/X11/lib
+LIB_PATH = -L${X11BASE}/lib # Libraries for X
+INC_PATH = -I. -I${X11BASE}/include # Header files for X
+INST_LIBS= ${PREFIX}/lib
XAW= ./X11/XawPlus
@@ -39,10 +39,12 @@
MenuButton.o Toggle.o Panner.o Command.o Repeater.o \
Grip.o Scrollbar.o List.o \
Tree.o DrawingArea.o StripChart.o Dialog.o
+all: lib
-all: lib install
lib: libXawPlus.a libXawPlus.so.3.1 libXaw.so.6.6 libXaw.so.7.0
+.PHONY: clean
+
clean:
rm -f *.o *.a *.so*
@@ -53,7 +55,7 @@
libXawPlus.so.3.1: $(OBJS)
$(CC) -shared -Wl,-soname,libXawPlus.so.3 \
- -o libXawPlus.so.3.1 $(OBJS)
+ -o libXawPlus.so.3 $(OBJS)
libXaw.so.6.6: $(OBJS)
$(CC) -shared -Wl,-soname,libXaw.so.6 \
@@ -66,14 +68,14 @@
# --- This only works as superuser root
install:
- rm -rf /usr/X11/include/X11/XawPlus
- mkdir -p /usr/X11/include/X11/XawPlus
- cp ./X11/XawPlus/*.h /usr/X11/include/X11/XawPlus
+ rm -rf ${PREFIX}/include/X11/XawPlus
+ mkdir -p ${PREFIX}/include/X11/XawPlus
+ ${BSD_INSTALL_DATA} ./X11/XawPlus/*.h ${PREFIX}/include/X11/XawPlus
cp libXawPlus.a $(INST_LIBS)
rm -f $(INST_LIBS)/libXawPlus.so.3 $(INST_LIBS)/libXawPlus.so
- cp libXawPlus.so.3.1 $(INST_LIBS)
+ ${BSD_INSTALL_DATA} libXawPlus.so.3 $(INST_LIBS)
ldconfig
- ln -s $(INST_LIBS)/libXawPlus.so.3.1 $(INST_LIBS)/libXawPlus.so
+ ln -s $(INST_LIBS)/libXawPlus.so.3 $(INST_LIBS)/libXawPlus.so
installxaw:
rm -f $(INST_LIBS)/libXaw.so.6 \