1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-10-31 21:57:12 +00:00
freebsd-ports/devel/codemedic/Makefile
Mario Sergio Fujikawa Ferreira 07e035580d Reduce the HTTP traffic on freefall. Move MASTERS_SITES
from sobomax homepage to MASTER_SITE_LOCAL with
MASTER_SITE_SUBDIR=lioux. Thanks sobomax :)
2000-11-28 23:39:36 +00:00

114 lines
2.9 KiB
Makefile

# New ports collection makefile for: Code Medic
# Date created: 30 July 1999
# Whom: Davec <davec@unforgettable.com>
#
# $FreeBSD$
#
PORTNAME= code_medic
PORTVERSION= 1.0.4
CATEGORIES= devel
MASTER_SITES= ${MASTER_SITE_LOCAL}
MASTER_SITE_SUBDIR= lioux
DISTNAME= Code_Medic_source-${PORTVERSION}
MAINTAINER= lioux@FreeBSD.org
BUILD_DEPENDS= ${NONEXISTENT}:${JXPORT}:configure \
makemake:${JXPORT}
LIB_DEPENDS= jx-1_5_3.1:${JXPORT} \
jsearch-0_5_6.0:${PORTSDIR}/x11-toolkits/libjsearch \
jtree-1_1_7.1:${PORTSDIR}/x11-toolkits/libjtree
WRKSRC= ${WRKDIR}/JX-1.5.3
USE_XLIB= yes
USE_BISON= yes
USE_GMAKE= yes
# breaks if CXX is c++, bugs me
MAKE_ARGS= CC="${CC}" CXX="g++" \
CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}"
MAKE_ENV= JX_INSTALL_ROOT="${X11BASE}/bin" \
JX_LIB_ROOT="${X11BASE}/lib"
PLIST_SUB= PORTNAME="${PORTNAME}"
# Make environment
PORTINCLUDES= -I${X11BASE}/include -I${X11BASE}/include/jx \
-I${X11BASE}/include/jcore \
-I${X11BASE}/include/jsearch \
-I${X11BASE}/include/jtree \
-I${LOCALBASE}/include
PORTLIBS= -L${X11BASE}/lib
# Installs dir with proper permissions
INSTALL_DATA_DIR= ${INSTALL} -d -o ${SHAREOWN} -g ${SHAREGRP} -m 755
# program files
PROGRAMFILES= code_medic/medic
# documents
DOCFILES= LICENSE README.binary
DOCDIR_PREFIX= ${PREFIX}/share/doc/${PORTNAME}
# additional configuration and header files
EXTRALIB_PREFIX= ${X11BASE}/lib/jx
EXTRALIBFILES_MAKE_WRKSRC= include/make
.include <bsd.port.pre.mk>
# main jx distribution files needed for building
COPY_JXDIRS= include
COPY_JXFILES= Makefile
# main jx distribution port wrksrc
JXPORT= ${PORTSDIR}/x11-toolkits/jx
JXPORT_WRKSRC!= cd ${JXPORT} && ${MAKE} -V WRKSRC
JX_MAKE_CONSTANTS= jsearch_constants jtree_constants
.if ${OSVERSION} >= 300000
ALL_TARGET= freebsd3.x
.else
ALL_TARGET= freebsd2.x
.endif
.if defined(NOPORTDOCS)
PLIST_SUB+= PORTDOCS:="@comment "
.else
PLIST_SUB+= PORTDOCS:=
.endif # !defined(NOPORTDOCS)
post-extract:
.for i in ${COPY_JXDIRS}
@${CP} -Rp ${JXPORT_WRKSRC}/${i} ${WRKSRC}
.endfor
.for i in ${COPY_JXFILES}
@${CP} -p ${JXPORT_WRKSRC}/${i} ${WRKSRC}
.endfor
post-patch:
@${ECHO} "SEARCHDIRS += ${PORTINCLUDES}" >> \
${WRKSRC}/${EXTRALIBFILES_MAKE_WRKSRC}/jx_constants
@${ECHO} "\nLOADLIBS += ${PORTLIBS}" >> \
${WRKSRC}/programs/${PORTNAME}/Make.header
pre-build:
.for i in ${JX_MAKE_CONSTANTS}
@${LN} -sf ${EXTRALIB_PREFIX}/make/${i} ${WRKSRC}/include/make
.endfor
post-build:
@cd ${WRKSRC}/programs/${PORTNAME}; ${SETENV} ${MAKE_ENV} makemake; \
${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_FLAGS} \
${MAKEFILE} ${MAKE_ARGS}
do-install:
.if !defined(NOPORTDOCS)
# Install all documentation
@${INSTALL_DATA_DIR} ${DOCDIR_PREFIX}
.for i in ${DOCFILES}
@${INSTALL_DATA} ${WRKSRC}/programs/${PORTNAME}/${i} ${DOCDIR_PREFIX}
.endfor
.endif # !defined(NOPORTDOCS)
# Install all programs
.for i in ${PROGRAMFILES}
@${INSTALL_PROGRAM} ${WRKSRC}/programs/${i} ${PREFIX}/bin
.endfor
.include <bsd.port.post.mk>