pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/48822: update: devel/astyle to 2.04



>Number:         48822
>Category:       pkg
>Synopsis:       update: devel/astyle to 2.04
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Mon May 19 19:35:01 +0000 2014
>Originator:     Rhialto
>Release:        NetBSD 6.1.1
>Organization:
        
>Environment:
        
        
System: NetBSD murthe.falu.nl 6.1.1 NetBSD 6.1.1 (MURTHE6.1.1) #4: Sat Sep 28 
12:38:49 CEST 2013 
rhialto%murthe.falu.nl@localhost:/usr/src/sys/arch/amd64/compile/MURTHE6.1.1 
amd64
Architecture: x86_64
Machine: amd64
>Description:
        The version of devel/astyle in pkgsrc is very old.
        Here is an entry for the current version.
        The existing patch files are to be removed, and replaced by
        the ones in the shar file.
        For the other file there are diffs.
>How-To-Repeat:
        Somebody mentions astyle and example layout.
        Find the one in pkgsrc is too old for the style given.
>Fix:
        Patches followed by shar file of replacement patches/*.
        The patch for astyle_main.cpp is not strictly needed for
        the target that is installed, but it is for some others.

        The "download" from sourceforge seems non-standard?
        I don't know if it can be expressed cleaner.

? patches/patch-astyle_build_gcc_Makefile
? patches/patch-src_astyle__main.cpp
cvs diff: Diffing .
Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/devel/astyle/Makefile,v
retrieving revision 1.15
diff -u -r1.15 Makefile
--- Makefile    25 May 2013 16:39:39 -0000      1.15
+++ Makefile    19 May 2014 19:23:18 -0000
@@ -1,11 +1,12 @@
 # $NetBSD: Makefile,v 1.15 2013/05/25 16:39:39 shattered Exp $
 #
 
-DISTNAME=      astyle_1.15.3
-PKGNAME=       astyle-1.15.3
+DISTNAME=      astyle_2.04_linux
+PKGNAME=       astyle-2.04
 CATEGORIES=    textproc devel
-MASTER_SITES=  ${MASTER_SITE_SOURCEFORGE:=astyle/}
-EXTRACT_SUFX=  .zip
+MASTER_SITES=  
http://downloads.sourceforge.net/project/astyle/astyle/astyle%202.04/
+#MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=astyle/}astyle/astyle%202.04
+#EXTRACT_SUFX= .zip
 
 MAINTAINER=    pkgsrc-users%NetBSD.org@localhost
 HOMEPAGE=      http://astyle.sourceforge.net/
@@ -16,16 +17,14 @@
 INSTALLATION_DIRS=     bin ${HTMLDIR}
 
 USE_LANGUAGES= c++
-WRKSRC=                ${WRKDIR}
+USE_TOOLS+=    gmake
+WRKSRC=                ${WRKDIR}/astyle
+BUILD_DIRS=    build/gcc
+BUILD_TARGET=  astyle
+INSTALL_DIRS=  build/gcc
+MAKE_ENV+=     DESTDIR=${DESTDIR}
+MAKE_ENV+=     prefix=${PREFIX}
 
 .include "../../mk/compiler.mk"
 
-.if !empty(CC_VERSION:Mgcc-2*)
-CFLAGS+=       -DASTYLE_GCC2
-.endif
-
-post-install:
-       cd ${WRKSRC} && ${INSTALL_DATA} astyle.html \
-               astyle_release_notes.html license.html ${DESTDIR}${HTMLDIR}
-
 .include "../../mk/bsd.pkg.mk"
Index: PLIST
===================================================================
RCS file: /cvsroot/pkgsrc/devel/astyle/PLIST,v
retrieving revision 1.2
diff -u -r1.2 PLIST
--- PLIST       14 Jun 2009 17:48:33 -0000      1.2
+++ PLIST       19 May 2014 19:23:18 -0000
@@ -1,5 +1,13 @@
 @comment $NetBSD: PLIST,v 1.2 2009/06/14 17:48:33 joerg 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
Index: distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/devel/astyle/distinfo,v
retrieving revision 1.11
diff -u -r1.11 distinfo
--- distinfo    25 May 2013 16:39:39 -0000      1.11
+++ distinfo    19 May 2014 19:23:18 -0000
@@ -1,7 +1,7 @@
 $NetBSD: distinfo,v 1.11 2013/05/25 16:39:39 shattered 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-astyle_build_gcc_Makefile) = 
0df2dd10bac60aa939096870a077f7527aeebf9a
+SHA1 (patch-src_astyle__main.cpp) = 211dd259df44e7e8b0499c531a001bb6e9bca04d
cvs diff: Diffing patches
cvs diff: cannot find patches/patch-aa
cvs diff: cannot find patches/patch-ac


# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#       patches/patch-astyle_build_gcc_Makefile
#       patches/patch-src_astyle__main.cpp
#
echo x - patches/patch-astyle_build_gcc_Makefile
sed 's/^X//' >patches/patch-astyle_build_gcc_Makefile << 
'END-of-patches/patch-astyle_build_gcc_Makefile'
X$NetBSD$
X
XFix paths, and add DESTDIR. Leave CXX for pkgsrc to define.
X
X--- build/gcc/Makefile.orig    2013-11-01 20:31:48.000000000 +0000
X+++ build/gcc/Makefile
X@@ -23,7 +23,7 @@ endif
X ifndef prefix
X     prefix=/usr
X endif
X-SYSCONF_PATH=$(prefix)/share/doc/astyle
X+SYSCONF_PATH=$(prefix)/share/doc/html/astyle
X # the path was changed in release 2.01
X # SYSCONF_PATH_OLD may be removed at the appropriate time
X SYSCONF_PATH_OLD=$(prefix)/share/astyle
X@@ -34,8 +34,8 @@ objdir = obj
X ipath=$(prefix)/bin
X CBASEFLAGS = -W -Wall -fno-rtti -fno-exceptions
X JAVAINCS   = -I$(JAVA_HOME)/include
X-CXX = g++
X-INSTALL=install -o $(USER) -g $(USER)
X+#CXX = g++
X+INSTALL=install
X 
X ##################################################
X 
X@@ -178,17 +178,17 @@ cleanobj:
X       rm -f $(objdir)/*.o
X 
X install:
X-      $(INSTALL) -m 755 -d $(ipath)
X-      @$(INSTALL) -m 755 $(bindir)/astyle  $(ipath)
X+      $(INSTALL) -m 755 -d ${DESTDIR}$(ipath)
X+      @$(INSTALL) -m 755 $(bindir)/astyle  ${DESTDIR}$(ipath)
X 
X-      $(INSTALL) -m 755 -d $(SYSCONF_PATH)
X-      @mkdir -p $(SYSCONF_PATH)/html;
X+      $(INSTALL) -m 755 -d ${DESTDIR}/$(SYSCONF_PATH)
X+      @mkdir -p ${DESTDIR}$(SYSCONF_PATH);
X       @for files in ../../doc/*.html  ../../doc/*.css; \
X       do \
X-              $(INSTALL)  -m 644  $$files  $(SYSCONF_PATH)/html; \
X+              $(INSTALL)  -m 644  $$files  ${DESTDIR}$(SYSCONF_PATH); \
X       done
X-      @if [ -d $(SYSCONF_PATH_OLD) ];  then \
X-              rm -rf $(SYSCONF_PATH_OLD); \
X+      @if [ -d ${DESTDIR}$(SYSCONF_PATH_OLD) ];  then \
X+              rm -rf ${DESTDIR}$(SYSCONF_PATH_OLD); \
X       fi
X 
X uninstall:
END-of-patches/patch-astyle_build_gcc_Makefile
echo x - patches/patch-src_astyle__main.cpp
sed 's/^X//' >patches/patch-src_astyle__main.cpp << 
'END-of-patches/patch-src_astyle__main.cpp'
X$NetBSD$
X
XNetBSD iconv const patch.
X
X--- src/astyle_main.cpp.orig   2013-11-01 20:31:48.000000000 +0000
X+++ src/astyle_main.cpp
X@@ -2671,7 +2671,12 @@ utf16_t* ASLibrary::convertUtf8ToUtf16(c
X       size_t inLeft = strlen(utf8In) + 1;             // converts the ending 
NULL
X       char* utf16Conv = reinterpret_cast<char*>(utf16Out);
X       size_t outLeft = utf16Len;
X+#ifdef __NetBSD__
X+      size_t iconvval = iconv(iconvh, (const char **)&utf8Conv, &inLeft, 
&utf16Conv, &outLeft);
X+#else
X       size_t iconvval = iconv(iconvh, &utf8Conv, &inLeft, &utf16Conv, 
&outLeft);
X+#endif
X+
X       ///////////////////////////////////////////////////////
X       bool showStats = false;
X       if (showStats && (inLeft != 0 || outLeft != 0))
X@@ -2713,7 +2718,11 @@ char* ASLibrary::convertUtf16ToUtf8(cons
X       size_t inLeft = (utf16len(utf16In) + 1) * sizeof(utf16_t);      // 
converts the ending NULL
X       char* utf8Conv = utf8Out;
X       size_t outLeft = utf8Len;
X+#ifdef __NetBSD__
X+      size_t iconvval = iconv(iconvh, (const char **)&utf16Conv, &inLeft, 
&utf8Conv, &outLeft);
X+#else
X       size_t iconvval = iconv(iconvh, &utf16Conv, &inLeft, &utf8Conv, 
&outLeft);
X+#endif
X       ///////////////////////////////////////////////////////
X       bool showStats = false;
X       if (showStats && (inLeft != 0 || outLeft != 0))
END-of-patches/patch-src_astyle__main.cpp
exit

-Olaf.
-- 
___ Olaf 'Rhialto' Seibert  -- The Doctor: No, 'eureka' is Greek for
\X/ rhialto/at/xs4all.nl    -- 'this bath is too hot.'

>Unformatted:
        
        


Home | Main Index | Thread Index | Old Index