diff --git a/devel/astyle/Makefile b/devel/astyle/Makefile index 9f4eafb67c685..540008e820083 100644 --- a/devel/astyle/Makefile +++ b/devel/astyle/Makefile @@ -1,31 +1,25 @@ -# $NetBSD: Makefile,v 1.15 2013/05/25 16:39:39 shattered Exp $ -# +# $NetBSD: Makefile,v 1.16 2014/08/13 20:56:25 wiz Exp $ -DISTNAME= astyle_1.15.3 -PKGNAME= astyle-1.15.3 +DISTNAME= astyle_2.04_linux +PKGNAME= ${DISTNAME:S/_linux//:S/_/-/} CATEGORIES= textproc devel MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=astyle/} -EXTRACT_SUFX= .zip MAINTAINER= pkgsrc-users@NetBSD.org HOMEPAGE= http://astyle.sourceforge.net/ -COMMENT= Reindenter and reformatter of C, C++, C# and Java source code -LICENSE= gnu-gpl-v2 - -HTMLDIR= ${PREFIX}/share/doc/html/astyle -INSTALLATION_DIRS= bin ${HTMLDIR} +COMMENT= Free, Fast and Small Automatic Formatter for C, C++, C++/CLI, C#, and Java +LICENSE= gnu-lgpl-v3 +WRKSRC= ${WRKDIR}/astyle +BUILD_DIRS= build/gcc +USE_TOOLS+= gmake USE_LANGUAGES= c++ -WRKSRC= ${WRKDIR} -.include "../../mk/compiler.mk" - -.if !empty(CC_VERSION:Mgcc-2*) -CFLAGS+= -DASTYLE_GCC2 -.endif +HTMLDIR= ${PREFIX}/share/doc/html/astyle +INSTALLATION_DIRS= bin ${HTMLDIR} -post-install: - cd ${WRKSRC} && ${INSTALL_DATA} astyle.html \ - astyle_release_notes.html license.html ${DESTDIR}${HTMLDIR} +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/build/gcc/bin/astyle ${DESTDIR}${PREFIX}/bin + cd ${WRKSRC}/doc && ${INSTALL_DATA} * ${DESTDIR}${HTMLDIR} .include "../../mk/bsd.pkg.mk" diff --git a/devel/astyle/PLIST b/devel/astyle/PLIST index ce23b2b27ef24..5e0b989769848 100644 --- a/devel/astyle/PLIST +++ b/devel/astyle/PLIST @@ -1,5 +1,13 @@ -@comment $NetBSD: PLIST,v 1.2 2009/06/14 17:48:33 joerg Exp $ +@comment $NetBSD: PLIST,v 1.3 2014/08/13 20:56:25 wiz Exp $ bin/astyle share/doc/html/astyle/astyle.html -share/doc/html/astyle/astyle_release_notes.html +share/doc/html/astyle/index.html +share/doc/html/astyle/install.html share/doc/html/astyle/license.html +share/doc/html/astyle/links.html +share/doc/html/astyle/news.html +share/doc/html/astyle/notes.html +share/doc/html/astyle/scripts.html +share/doc/html/astyle/styles.css +share/doc/html/astyle/subversion.html +share/doc/html/astyle/vsinstall.html diff --git a/devel/astyle/distinfo b/devel/astyle/distinfo index ab76aa836b83f..cbe051d006034 100644 --- a/devel/astyle/distinfo +++ b/devel/astyle/distinfo @@ -1,7 +1,6 @@ -$NetBSD: distinfo,v 1.11 2013/05/25 16:39:39 shattered Exp $ +$NetBSD: distinfo,v 1.12 2014/08/13 20:56:25 wiz Exp $ -SHA1 (astyle_1.15.3.zip) = 51e115d1f84028899fff1725d4c6298d5e191ea4 -RMD160 (astyle_1.15.3.zip) = ec84150edbe09dcd62ef960f288b688b52553d8b -Size (astyle_1.15.3.zip) = 60880 bytes -SHA1 (patch-aa) = 67bb1b1802e74bc264cb951a55075982c566d463 -SHA1 (patch-ac) = 42b568e4bb8f6a9748c1ec73db641739ce14e673 +SHA1 (astyle_2.04_linux.tar.gz) = 8d7701afa3ecb7fb24d3647d8b278dcf17f3ae3e +RMD160 (astyle_2.04_linux.tar.gz) = 94d237759e5d2e4d45db5614ee091996f1a995f2 +Size (astyle_2.04_linux.tar.gz) = 156974 bytes +SHA1 (patch-src_astyle__main.cpp) = 6ebe3d3266dff6d27748c03ac24dda6a1f187d39 diff --git a/devel/astyle/patches/patch-src_astyle__main.cpp b/devel/astyle/patches/patch-src_astyle__main.cpp new file mode 100644 index 0000000000000..2a15a6e152c2b --- /dev/null +++ b/devel/astyle/patches/patch-src_astyle__main.cpp @@ -0,0 +1,30 @@ +$NetBSD: patch-src_astyle__main.cpp,v 1.1 2014/08/13 20:56:25 wiz Exp $ + +Fix build on NetBSD. + +--- src/astyle_main.cpp.orig 2013-11-01 20:31:48.000000000 +0000 ++++ src/astyle_main.cpp +@@ -2671,7 +2671,11 @@ utf16_t* ASLibrary::convertUtf8ToUtf16(c + size_t inLeft = strlen(utf8In) + 1; // converts the ending NULL + char* utf16Conv = reinterpret_cast(utf16Out); + size_t outLeft = utf16Len; ++#ifdef __NetBSD__ ++ size_t iconvval = iconv(iconvh, (const char **)&utf8Conv, &inLeft, &utf16Conv, &outLeft); ++#else + size_t iconvval = iconv(iconvh, &utf8Conv, &inLeft, &utf16Conv, &outLeft); ++#endif + /////////////////////////////////////////////////////// + bool showStats = false; + if (showStats && (inLeft != 0 || outLeft != 0)) +@@ -2713,7 +2717,11 @@ char* ASLibrary::convertUtf16ToUtf8(cons + size_t inLeft = (utf16len(utf16In) + 1) * sizeof(utf16_t); // converts the ending NULL + char* utf8Conv = utf8Out; + size_t outLeft = utf8Len; ++#ifdef __NetBSD__ ++ size_t iconvval = iconv(iconvh, (const char **)&utf16Conv, &inLeft, &utf8Conv, &outLeft); ++#else + size_t iconvval = iconv(iconvh, &utf16Conv, &inLeft, &utf8Conv, &outLeft); ++#endif + /////////////////////////////////////////////////////// + bool showStats = false; + if (showStats && (inLeft != 0 || outLeft != 0))