pkgsrc/devel/w32api/Makefile
kent 8ed2977450 Sync with PEACE repositry
http://cvs.kshosen.ac.jp/cvsweb.cgi/peace/pkgsrc/devel/w32api/
 * Update w32api to 1.5
   - Add comcat.h, mapi.h, ntsecpkg.h, schannel.h, schnlsp.h,
     security.h, sspi.h, wsnetbs.h,
   - Many bug fixes
 * Add crt files for PEACE
2002-08-21 12:59:17 +00:00

46 lines
2.1 KiB
Makefile

# $NetBSD: Makefile,v 1.11 2002/08/21 12:59:17 kent Exp $
# $PEACE: Makefile,v 1.21 2002/08/21 02:02:27 kent Exp $
DISTNAME= w32api-1.5-src
PKGNAME= w32api-1.5
PKGREVISION= 1
WRKSRC= ${WRKDIR}/${DISTNAME:S/-src//}
CATEGORIES= devel
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=mingw/}
DISTFILES+= ${DISTNAME}.tar.gz pe-crt-1.2.tar.gz
SITES_pe-crt-1.2.tar.gz=http://www.hauN.org/kent/
MAINTAINER= peace-sacrifice@hauN.org
HOMEPAGE= http://www.mingw.org/
COMMENT= Free headers and libraries for the Win32 API
BUILD_DEPENDS+= cross-i386-netbsdpe:../../cross/i386-netbsdpe
PE_CC= ${CROSSBASE}/bin/i386-netbsdpe-cc -I${WRKSRC}/include
PE_AR= ${CROSSBASE}/bin/i386-netbsdpe-ar
CRTWRKSRC= ${WRKDIR}/pe-crt-1.2
CFLAGS+= -I${WRKDIR}/include
# Building no import libraries but two static libraries.
do-build:
cd ${WRKSRC}/lib \
&& ${PE_CC} -c -o dxguid.o dxguid.c \
&& ${PE_CC} -c -o uuid.o uuid.c \
&& ${PE_AR} r libdxguid.a dxguid.o \
&& ${PE_AR} r libuuid.a uuid.o
${MKDIR} ${WRKDIR}/include
for i in ${WRKSRC}/include/*.h; do \
${SED} 's/(CALLBACK/ CALLBACK (/g; s/typedef \(.*\)(NTAPI/typedef \1 NTAPI (/g; s/typedef \(.*\)(WINAPI/typedef \1 WINAPI (/g; s/typedef \(.*\)(STDAPICALLTYPE/typedef \1 STDAPICALLTYPE (/g; s/typedef \(.*\)(APIENTRY/typedef \1 APIENTRY (/g; s/typedef \(.*\)(PASCAL/typedef \1 PASCAL (/g; s/typedef \(.*\)(STDCALL/typedef \1 STDCALL (/g; s/typedef \(.*\)(__RPC_API/typedef \1 __RPC_API (/g; s/typedef \(.*\)(__RPC_USER/typedef \1 __RPC_USER (/g; s/typedef \(.*\)(__stdcall/typedef \1 __stdcall (/g; s/typedef \(.*\)(__RPC_STUB/typedef \1 __RPC_STUB (/g' $$i > ${WRKDIR}/include/`basename $$i`; \
done
${_PKG_SILENT}cd ${CRTWRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE_PROGRAM}
do-install:
${INSTALL_DATA_DIR} ${CROSSBASE}/i386-netbsdpe/include
${INSTALL_DATA} ${WRKDIR}/include/*.h ${CROSSBASE}/i386-netbsdpe/include
${INSTALL_DATA_DIR} ${CROSSBASE}/i386-netbsdpe/lib
${INSTALL_DATA} ${WRKSRC}/lib/lib*.a ${CROSSBASE}/i386-netbsdpe/lib
${_PKG_SILENT}cd ${CRTWRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE_PROGRAM} install
post-install:
PKG_PREFIX=${LOCALBASE} ${SH} ${INSTALL_FILE} ${PKGNAME} POST-INSTALL
.include "../../mk/bsd.pkg.mk"