pkgsrc-WIP-changes archive

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

wip/nsm: Add patches from https://github.com/nifty-site-manager/nsm/pull/1



Module Name:	pkgsrc-wip
Committed By:	ng0 <ng0%NetBSD.org@localhost>
Pushed By:	ng0
Date:		Tue Oct 22 08:05:35 2019 +0000
Changeset:	10837ab3d08e227bed320a16c505b2a35659c0e6

Modified Files:
	nsm/Makefile
	nsm/distinfo
Added Files:
	nsm/patches/patch-Makefile-aa
	nsm/patches/patch-Makefile-ab
	nsm/patches/patch-Makefile-ac

Log Message:
wip/nsm: Add patches from https://github.com/nifty-site-manager/nsm/pull/1

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=10837ab3d08e227bed320a16c505b2a35659c0e6

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 nsm/Makefile                  | 13 --------
 nsm/distinfo                  |  3 ++
 nsm/patches/patch-Makefile-aa | 17 +++++++++++
 nsm/patches/patch-Makefile-ab | 55 ++++++++++++++++++++++++++++++++++
 nsm/patches/patch-Makefile-ac | 69 +++++++++++++++++++++++++++++++++++++++++++
 5 files changed, 144 insertions(+), 13 deletions(-)

diffs:
diff --git a/nsm/Makefile b/nsm/Makefile
index 3038947bcb..43963758c4 100644
--- a/nsm/Makefile
+++ b/nsm/Makefile
@@ -15,18 +15,5 @@ USE_LANGUAGES=		c++
 INSTALLATION_DIRS=	bin
 BUILD_TARGET=		nsm
 
-# https://github.com/nifty-site-manager/nsm/pull/1
-SUBST_CLASSES+=		cc
-SUBST_STAGE.cc=		pre-build
-SUBST_MESSAGE.cc=	fixing cc
-SUBST_FILES.cc=		Makefile
-SUBST_SED.cc+=		-e 's,g++,${CXX:Q},g'
-
-# We have lots of system specific assumptions and no
-# real portable install target in the Makefile
-do-install:
-	${INSTALL_PROGRAM} ${WRKSRC}/nift ${DESTDIR}${PREFIX}/bin/nift
-	${INSTALL_PROGRAM} ${WRKSRC}/nsm ${DESTDIR}${PREFIX}/bin/nsm
-
 .include "../../mk/pthread.buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"
diff --git a/nsm/distinfo b/nsm/distinfo
index 11eaefc282..6eddca7c32 100644
--- a/nsm/distinfo
+++ b/nsm/distinfo
@@ -4,3 +4,6 @@ SHA1 (nsm-1.15.tar.gz) = 8122a8faba3be0f74277ffe9b2c646e1a1858da9
 RMD160 (nsm-1.15.tar.gz) = e7988ea76ce0cccfdd45f18be0f3506fe7e2644a
 SHA512 (nsm-1.15.tar.gz) = cbd8d0f791f5715b1995bc06baa41c4e79fef4feaf38df2c8735021fe20b8c410d127bcb4b01caf97039e686bb451ecb0f326ed8de3ca954c37c29207c4ab023
 Size (nsm-1.15.tar.gz) = 96116 bytes
+SHA1 (patch-Makefile-aa) = f858cec97cd0f25052922a5e0b2535a627eb2eae
+SHA1 (patch-Makefile-ab) = 979ffc6c6fa3ad70801f3fdc1bc815de8eadc4fa
+SHA1 (patch-Makefile-ac) = d03238e4d67c50bdee2b8a22e4ec029fbd8458ac
diff --git a/nsm/patches/patch-Makefile-aa b/nsm/patches/patch-Makefile-aa
new file mode 100644
index 0000000000..173dac2112
--- /dev/null
+++ b/nsm/patches/patch-Makefile-aa
@@ -0,0 +1,17 @@
+$NetBSD$
+
+From 9137389f1efdec3502f81b0d7f39a233173a639d upstream
+Makefile: Use ${CXX} instead of g++
+
+
+--- Makefile~
++++ Makefile
+@@ -1,7 +1,7 @@
+ #basic makefile for nsm
+ objects=nsm.o DateTimeInfo.o Directory.o Filename.o PageBuilder.o PageInfo.o Path.o Quoted.o SiteInfo.o Title.o
+ cppfiles=nsm.cpp DateTimeInfo.cpp Directory.cpp Filename.cpp PageBuilder.cpp PageInfo.cpp Path.cpp Quoted.cpp SiteInfo.cpp Title.cpp
+-CC=g++
++CC=${CXX}
+ LINK=-pthread
+ CXXFLAGS=-std=c++11 -Wall -Wextra -pedantic -O3
+ #Flags to use when compiling for Chocolatey
diff --git a/nsm/patches/patch-Makefile-ab b/nsm/patches/patch-Makefile-ab
new file mode 100644
index 0000000000..62da972cfd
--- /dev/null
+++ b/nsm/patches/patch-Makefile-ab
@@ -0,0 +1,55 @@
+$NetBSD$
+
+From d9ff260d813c9d8057d9e6572c3735f64f99b174 upstream
+Add PREFIX + DESTDIR support, add install + uninstall target.
+
+
+--- Makefile~
++++ Makefile
+@@ -3,9 +3,14 @@ objects=nsm.o DateTimeInfo.o Directory.o Filename.o PageBuilder.o PageInfo.o Pat
+ cppfiles=nsm.cpp DateTimeInfo.cpp Directory.cpp Filename.cpp PageBuilder.cpp PageInfo.cpp Path.cpp Quoted.cpp SiteInfo.cpp Title.cpp
+ CC=${CXX}
+ LINK=-pthread
+-CXXFLAGS=-std=c++11 -Wall -Wextra -pedantic -O3
++CXXFLAGS+= -std=c++11 -Wall -Wextra -pedantic -O3
+ #Flags to use when compiling for Chocolatey
+ #CXXFLAGS=-std=c++11 -Wall -Wextra -pedantic -O3 -static -static-libgcc -static-libstdc++
++DESTDIR?=
++PREFIX?=/usr/local
++BINDIR=${DESTDIR}${PREFIX}/bin
++
++all: nsm
+ 
+ nsm: $(objects)
+ 	$(CC) $(CXXFLAGS) $(cppfiles) -o nsm $(LINK)
+@@ -45,23 +50,15 @@ linux-gedit-highlighting:
+ 	chmod 644 html.lang
+ 	cp html.lang /usr/share/gtksourceview-3.0/language-specs/html.lang
+ 
+-linux-install:
+-	chmod 755 nsm
+-	mv nift /usr/local/bin
+-	mv nsm /usr/local/bin
+-
+-linux-uninstall:
+-	rm /usr/local/bin/nift
+-	rm /usr/local/bin/nsm
+-
+-osx-install:
++install:
++	mkdir -p ${BINDIR}
+ 	chmod 755 nsm
+-	mv nift /usr/local/bin
+-	mv nsm /usr/local/bin
++	mv nift ${BINDIR}
++	mv nsm ${BINDIR}
+ 
+-osx-uninstall:
+-	rm /usr/local/bin/nift
+-	rm /usr/local/bin/nsm 
++uninstall:
++	rm ${BINDIR}/nift
++	rm ${BINDIR}/nsm
+ 
+ git-bash-install:
+ 	chmod 755 nsm
diff --git a/nsm/patches/patch-Makefile-ac b/nsm/patches/patch-Makefile-ac
new file mode 100644
index 0000000000..0f6cb9367a
--- /dev/null
+++ b/nsm/patches/patch-Makefile-ac
@@ -0,0 +1,69 @@
+$NetBSD$
+
+From 467ac9c372fe2aabe8513ab4d5b34de6b050174f upstream
+Use CXX for C++ compiler, use conditional assignment operator
+ for CXX.
+
+
+--- Makefile~
++++ Makefile
+@@ -1,7 +1,7 @@
+ #basic makefile for nsm
+ objects=nsm.o DateTimeInfo.o Directory.o Filename.o PageBuilder.o PageInfo.o Path.o Quoted.o SiteInfo.o Title.o
+ cppfiles=nsm.cpp DateTimeInfo.cpp Directory.cpp Filename.cpp PageBuilder.cpp PageInfo.cpp Path.cpp Quoted.cpp SiteInfo.cpp Title.cpp
+-CC=${CXX}
++CXX?=g++
+ LINK=-pthread
+ CXXFLAGS+= -std=c++11 -Wall -Wextra -pedantic -O3
+ #Flags to use when compiling for Chocolatey
+@@ -13,38 +13,38 @@ BINDIR=${DESTDIR}${PREFIX}/bin
+ all: nsm
+ 
+ nsm: $(objects)
+-	$(CC) $(CXXFLAGS) $(cppfiles) -o nsm $(LINK)
+-	$(CC) $(CXXFLAGS) $(cppfiles) -o nift $(LINK)
++	$(CXX) $(CXXFLAGS) $(cppfiles) -o nsm $(LINK)
++	$(CXX) $(CXXFLAGS) $(cppfiles) -o nift $(LINK)
+ 
+ nsm.o: nsm.cpp SiteInfo.o Timer.h
+-	$(CC) $(CXXFLAGS) -c -o $@ $< $(LINK)
++	$(CXX) $(CXXFLAGS) -c -o $@ $< $(LINK)
+ 
+ SiteInfo.o: SiteInfo.cpp SiteInfo.h PageBuilder.o
+-	$(CC) $(CXXFLAGS) -c -o $@ $< $(LINK)
++	$(CXX) $(CXXFLAGS) -c -o $@ $< $(LINK)
+ 
+ PageBuilder.o: PageBuilder.cpp PageBuilder.h DateTimeInfo.o PageInfo.o
+-	$(CC) $(CXXFLAGS) -c -o $@ $<
++	$(CXX) $(CXXFLAGS) -c -o $@ $<
+ 
+ DateTimeInfo.o: DateTimeInfo.cpp DateTimeInfo.h
+-	$(CC) $(CXXFLAGS) -c -o $@ $<
++	$(CXX) $(CXXFLAGS) -c -o $@ $<
+ 
+ PageInfo.o: PageInfo.cpp PageInfo.h Path.o Title.o
+-	$(CC) $(CXXFLAGS) -c -o $@ $<
++	$(CXX) $(CXXFLAGS) -c -o $@ $<
+ 
+ Path.o: Path.cpp Path.h Directory.o Filename.o
+-	$(CC) $(CXXFLAGS) -c -o $@ $<
++	$(CXX) $(CXXFLAGS) -c -o $@ $<
+ 
+ Directory.o: Directory.cpp Directory.h Quoted.h
+-	$(CC) $(CXXFLAGS) -c -o $@ $<
++	$(CXX) $(CXXFLAGS) -c -o $@ $<
+ 
+ Filename.o: Filename.cpp Filename.h Quoted.h
+-	$(CC) $(CXXFLAGS) -c -o $@ $<
++	$(CXX) $(CXXFLAGS) -c -o $@ $<
+ 
+ Title.o: Title.cpp Title.h Quoted.o
+-	$(CC) $(CXXFLAGS) -c -o $@ $<
++	$(CXX) $(CXXFLAGS) -c -o $@ $<
+ 
+ Quoted.o: Quoted.cpp Quoted.h
+-	$(CC) $(CXXFLAGS) -c -o $@ $<
++	$(CXX) $(CXXFLAGS) -c -o $@ $<
+ 
+ linux-gedit-highlighting:
+ 	chmod 644 html.lang


Home | Main Index | Thread Index | Old Index