Github messages for voidlinux
 help / color / mirror / Atom feed
From: voidlinux-github@inbox.vuxu.org
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] WIP: Cnping test makefile patch
Date: Sat, 28 Sep 2019 19:59:12 +0200	[thread overview]
Message-ID: <20190928175912.MhUAnewF0k4SgLqYipHKsHqlHXDsg_-7ALlxewwKQwU@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-13725@inbox.vuxu.org>

[-- Attachment #1: Type: text/plain, Size: 336 bytes --]

There is an updated pull request by dreua against master on the void-packages repository

https://github.com/dreua/void-packages cnping_test_makefile_patch
https://github.com/void-linux/void-packages/pull/13725

WIP: Cnping test makefile patch


A patch file from https://github.com/void-linux/void-packages/pull/13725.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-cnping_test_makefile_patch-13725.patch --]
[-- Type: text/x-diff, Size: 11702 bytes --]

From 665ee1bbc03e150f225f361be332758eef9f53f3 Mon Sep 17 00:00:00 2001
From: Jan Christian Gr??nhage <jan.christian@gruenhage.xyz>
Date: Mon, 12 Aug 2019 21:17:49 +0200
Subject: [PATCH 1/8] New package:
 cnping-afcc565771a37978eb0b54e185fa80482cdebe3a_1

---
 srcpkgs/cnping/template | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)
 create mode 100644 srcpkgs/cnping/template

diff --git a/srcpkgs/cnping/template b/srcpkgs/cnping/template
new file mode 100644
index 00000000000..16127afd91a
--- /dev/null
+++ b/srcpkgs/cnping/template
@@ -0,0 +1,22 @@
+# Template file for 'cnping'
+pkgname=cnping
+version=afcc565771a37978eb0b54e185fa80482cdebe3a
+revision=1
+hostmakedepends="gcc make libcap-progs"
+makedepends="libXinerama-devel"
+short_desc="Minimal Graphical IPV4 Ping Tool"
+maintainer="Jan Christian Grünhage <jan.christian@gruenhage.xyz>"
+license="MIT"
+homepage="https://github.com/cnlohr/cnping"
+distfiles="https://github.com/cnlohr/cnping/archive/${version}.tar.gz"
+checksum=9320ec8e1a982c538e217940c57ed894c16ad1363b2070c5a96d94564f2a9606
+
+do_build() {
+	make
+	setcap cap_net_raw=ep cnping
+}
+
+do_install() {
+	vbin cnping
+	vlicense LICENSE
+}

From e4ec9f87e4aa44622ff7fed068b622cefcbd499c Mon Sep 17 00:00:00 2001
From: David Auer <dreua@posteo.de>
Date: Sat, 17 Aug 2019 11:32:48 +0200
Subject: [PATCH 2/8] cnping: Patch makefile for cross compilation test

---
 srcpkgs/cnping/patches/fix_cc_makefile.patch | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 srcpkgs/cnping/patches/fix_cc_makefile.patch

diff --git a/srcpkgs/cnping/patches/fix_cc_makefile.patch b/srcpkgs/cnping/patches/fix_cc_makefile.patch
new file mode 100644
index 00000000000..61e87c50cfa
--- /dev/null
+++ b/srcpkgs/cnping/patches/fix_cc_makefile.patch
@@ -0,0 +1,17 @@
+diff --git a/Makefile b/Makefile
+index 799367d..aade5a9 100644
+--- a/Makefile
++++ b/Makefile
+@@ -15,7 +15,7 @@ cnping.exe : cnping.c CNFGFunctions.c CNFGWinDriver.c os_generic.c ping.c httpin
+ 	$(MINGW32)gcc -g -fno-ident -mwindows -m32 $(CFLAGS) resources.o -o $@ $^  -lgdi32 -lws2_32 -s -D_WIN32_WINNT=0x0600 -DWIN32
+ 
+ cnping : cnping.o CNFGFunctions.o CNFGXDriver.o os_generic.o ping.o httping.o
+-	gcc $(CFLAGS) -o $@ $^ -lX11 -lm -lpthread $(LDFLAGS) 
++	$(CC) $(CFLAGS) -o $@ $^ -lX11 -lm -lpthread $(LDFLAGS) 
+ 
+ cnping_mac : cnping.c CNFGFunctions.c CNFGCocoaCGDriver.m os_generic.c ping.c httping.o
+ 	gcc -o cnping $^ -x objective-c -framework Cocoa -framework QuartzCore -lm -lpthread
+diff --git a/cnping.exe b/cnping.exe
+deleted file mode 100755
+index 2302484..0000000
+Binary files a/cnping.exe and /dev/null differ

From cea84073f7989fdc08468ea0e9a78a6f97ee78e0 Mon Sep 17 00:00:00 2001
From: David Auer <dreua@posteo.de>
Date: Sat, 17 Aug 2019 11:58:05 +0200
Subject: [PATCH 3/8] Fix patch

---
 srcpkgs/cnping/patches/fix_cc_makefile.patch | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/srcpkgs/cnping/patches/fix_cc_makefile.patch b/srcpkgs/cnping/patches/fix_cc_makefile.patch
index 61e87c50cfa..4ff2f1636d6 100644
--- a/srcpkgs/cnping/patches/fix_cc_makefile.patch
+++ b/srcpkgs/cnping/patches/fix_cc_makefile.patch
@@ -1,7 +1,7 @@
 diff --git a/Makefile b/Makefile
 index 799367d..aade5a9 100644
---- a/Makefile
-+++ b/Makefile
+--- Makefile
++++ Makefile
 @@ -15,7 +15,7 @@ cnping.exe : cnping.c CNFGFunctions.c CNFGWinDriver.c os_generic.c ping.c httpin
  	$(MINGW32)gcc -g -fno-ident -mwindows -m32 $(CFLAGS) resources.o -o $@ $^  -lgdi32 -lws2_32 -s -D_WIN32_WINNT=0x0600 -DWIN32
  
@@ -11,7 +11,3 @@ index 799367d..aade5a9 100644
  
  cnping_mac : cnping.c CNFGFunctions.c CNFGCocoaCGDriver.m os_generic.c ping.c httping.o
  	gcc -o cnping $^ -x objective-c -framework Cocoa -framework QuartzCore -lm -lpthread
-diff --git a/cnping.exe b/cnping.exe
-deleted file mode 100755
-index 2302484..0000000
-Binary files a/cnping.exe and /dev/null differ

From a5f9d81d766b6606edd292bbf82a0dd972fe67be Mon Sep 17 00:00:00 2001
From: David Auer <dreua@posteo.de>
Date: Sat, 17 Aug 2019 12:29:50 +0200
Subject: [PATCH 4/8] Fix template

---
 srcpkgs/cnping/template | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/cnping/template b/srcpkgs/cnping/template
index 16127afd91a..06b48c789f3 100644
--- a/srcpkgs/cnping/template
+++ b/srcpkgs/cnping/template
@@ -12,7 +12,8 @@ distfiles="https://github.com/cnlohr/cnping/archive/${version}.tar.gz"
 checksum=9320ec8e1a982c538e217940c57ed894c16ad1363b2070c5a96d94564f2a9606
 
 do_build() {
-	make
+	make ${makejobs} CC="$BUILD_CC" CFLAGS="$BUILD_CFLAGS" \
+		LD="ld" LDFLAGS="$BUILD_LDFLAGS"
 	setcap cap_net_raw=ep cnping
 }
 

From 6bd4f221fa07f384609679c34b7ee1260b311468 Mon Sep 17 00:00:00 2001
From: David Auer <dreua@posteo.de>
Date: Sat, 17 Aug 2019 14:30:19 +0200
Subject: [PATCH 5/8] Fix neccessary flags

---
 srcpkgs/cnping/patches/fix_cc_makefile.patch | 34 +++++++++++++++++---
 1 file changed, 30 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/cnping/patches/fix_cc_makefile.patch b/srcpkgs/cnping/patches/fix_cc_makefile.patch
index 4ff2f1636d6..611a7230cdd 100644
--- a/srcpkgs/cnping/patches/fix_cc_makefile.patch
+++ b/srcpkgs/cnping/patches/fix_cc_makefile.patch
@@ -1,13 +1,39 @@
 diff --git a/Makefile b/Makefile
-index 799367d..aade5a9 100644
+index 799367d..cfa90c8 100644
 --- Makefile
 +++ Makefile
-@@ -15,7 +15,7 @@ cnping.exe : cnping.c CNFGFunctions.c CNFGWinDriver.c os_generic.c ping.c httpin
- 	$(MINGW32)gcc -g -fno-ident -mwindows -m32 $(CFLAGS) resources.o -o $@ $^  -lgdi32 -lws2_32 -s -D_WIN32_WINNT=0x0600 -DWIN32
+@@ -1,8 +1,11 @@
+ all : cnping searchnet
+ 
+-CFLAGS:=$(CFLAGS) -g -Os -I/opt/X11/include -Wall
+-CXXFLAGS:=$(CFLAGS)
+-LDFLAGS:=-g -L/opt/X11/lib/
++CC=gcc
++CFLAGS:=$(CFLAGS) -g -Os -Wall
++ALL_CFLAGS:=-I/opt/X11/include $(CFLAGS)
++LDFLAGS:=-g
++ALL_LDFLAGS:=-L/opt/X11/lib/ $(LDFLAGS)
++
+ 
+ #CFLAGS:=$(CFLAGS) -DCNFGOGL
+ #LDFLAGS:=$(LDFLAGS) -lGL
+@@ -12,16 +15,16 @@ MINGW32:=i686-w64-mingw32-
+ 
+ cnping.exe : cnping.c CNFGFunctions.c CNFGWinDriver.c os_generic.c ping.c httping.c
+ 	$(MINGW32)windres resources.rc -o resources.o
+-	$(MINGW32)gcc -g -fno-ident -mwindows -m32 $(CFLAGS) resources.o -o $@ $^  -lgdi32 -lws2_32 -s -D_WIN32_WINNT=0x0600 -DWIN32
++	$(MINGW32)gcc -g -fno-ident -mwindows -m32 $(ALL_CFLAGS) resources.o -o $@ $^  -lgdi32 -lws2_32 -s -D_WIN32_WINNT=0x0600 -DWIN32
  
  cnping : cnping.o CNFGFunctions.o CNFGXDriver.o os_generic.o ping.o httping.o
 -	gcc $(CFLAGS) -o $@ $^ -lX11 -lm -lpthread $(LDFLAGS) 
-+	$(CC) $(CFLAGS) -o $@ $^ -lX11 -lm -lpthread $(LDFLAGS) 
++	$(CC) $(ALL_CFLAGS) -o $@ $^ -lX11 -lm -lpthread $(ALL_LDFLAGS) 
  
  cnping_mac : cnping.c CNFGFunctions.c CNFGCocoaCGDriver.m os_generic.c ping.c httping.o
  	gcc -o cnping $^ -x objective-c -framework Cocoa -framework QuartzCore -lm -lpthread
+ 
+ searchnet : os_generic.o ping.o searchnet.o
+-	gcc $(CFLAGS) -o $@ $^ -lpthread
++	$(CC) $(ALL_CFLAGS) -o $@ $^ -lpthread
+ 
+ linuxinstall : cnping
+ 	sudo rm -f /usr/local/bin/cnping

From 91ea78b1cf3418dffcf92099ef85a428dce2f81a Mon Sep 17 00:00:00 2001
From: David Auer <dreua@posteo.de>
Date: Sat, 17 Aug 2019 16:38:59 +0200
Subject: [PATCH 6/8] Add dependency to libX11-devel

---
 srcpkgs/cnping/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/cnping/template b/srcpkgs/cnping/template
index 06b48c789f3..60e58b60a7a 100644
--- a/srcpkgs/cnping/template
+++ b/srcpkgs/cnping/template
@@ -3,7 +3,7 @@ pkgname=cnping
 version=afcc565771a37978eb0b54e185fa80482cdebe3a
 revision=1
 hostmakedepends="gcc make libcap-progs"
-makedepends="libXinerama-devel"
+makedepends="libXinerama-devel libX11-devel"
 short_desc="Minimal Graphical IPV4 Ping Tool"
 maintainer="Jan Christian Grünhage <jan.christian@gruenhage.xyz>"
 license="MIT"

From db35281cb070fa210f4d864ec665ab355feb5565 Mon Sep 17 00:00:00 2001
From: David Auer <dreua@posteo.de>
Date: Sat, 28 Sep 2019 18:04:07 +0200
Subject: [PATCH 7/8] Fix make arguments

---
 srcpkgs/cnping/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cnping/template b/srcpkgs/cnping/template
index 60e58b60a7a..32922110e63 100644
--- a/srcpkgs/cnping/template
+++ b/srcpkgs/cnping/template
@@ -12,8 +12,8 @@ distfiles="https://github.com/cnlohr/cnping/archive/${version}.tar.gz"
 checksum=9320ec8e1a982c538e217940c57ed894c16ad1363b2070c5a96d94564f2a9606
 
 do_build() {
-	make ${makejobs} CC="$BUILD_CC" CFLAGS="$BUILD_CFLAGS" \
-		LD="ld" LDFLAGS="$BUILD_LDFLAGS"
+	make ${makejobs} CC="$CC" CFLAGS="$CFLAGS" \
+		LD="ld" LDFLAGS="$LDFLAGS"
 	setcap cap_net_raw=ep cnping
 }
 

From cf25bdd25db8120359c0fdd4bce5d7096b33aec8 Mon Sep 17 00:00:00 2001
From: David Auer <dreua@posteo.de>
Date: Sat, 28 Sep 2019 19:59:01 +0200
Subject: [PATCH 8/8] Retry with newest version

---
 srcpkgs/cnping/patches/fix_cc_makefile.patch | 39 --------------------
 srcpkgs/cnping/template                      |  7 ++--
 2 files changed, 3 insertions(+), 43 deletions(-)
 delete mode 100644 srcpkgs/cnping/patches/fix_cc_makefile.patch

diff --git a/srcpkgs/cnping/patches/fix_cc_makefile.patch b/srcpkgs/cnping/patches/fix_cc_makefile.patch
deleted file mode 100644
index 611a7230cdd..00000000000
--- a/srcpkgs/cnping/patches/fix_cc_makefile.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-diff --git a/Makefile b/Makefile
-index 799367d..cfa90c8 100644
---- Makefile
-+++ Makefile
-@@ -1,8 +1,11 @@
- all : cnping searchnet
- 
--CFLAGS:=$(CFLAGS) -g -Os -I/opt/X11/include -Wall
--CXXFLAGS:=$(CFLAGS)
--LDFLAGS:=-g -L/opt/X11/lib/
-+CC=gcc
-+CFLAGS:=$(CFLAGS) -g -Os -Wall
-+ALL_CFLAGS:=-I/opt/X11/include $(CFLAGS)
-+LDFLAGS:=-g
-+ALL_LDFLAGS:=-L/opt/X11/lib/ $(LDFLAGS)
-+
- 
- #CFLAGS:=$(CFLAGS) -DCNFGOGL
- #LDFLAGS:=$(LDFLAGS) -lGL
-@@ -12,16 +15,16 @@ MINGW32:=i686-w64-mingw32-
- 
- cnping.exe : cnping.c CNFGFunctions.c CNFGWinDriver.c os_generic.c ping.c httping.c
- 	$(MINGW32)windres resources.rc -o resources.o
--	$(MINGW32)gcc -g -fno-ident -mwindows -m32 $(CFLAGS) resources.o -o $@ $^  -lgdi32 -lws2_32 -s -D_WIN32_WINNT=0x0600 -DWIN32
-+	$(MINGW32)gcc -g -fno-ident -mwindows -m32 $(ALL_CFLAGS) resources.o -o $@ $^  -lgdi32 -lws2_32 -s -D_WIN32_WINNT=0x0600 -DWIN32
- 
- cnping : cnping.o CNFGFunctions.o CNFGXDriver.o os_generic.o ping.o httping.o
--	gcc $(CFLAGS) -o $@ $^ -lX11 -lm -lpthread $(LDFLAGS) 
-+	$(CC) $(ALL_CFLAGS) -o $@ $^ -lX11 -lm -lpthread $(ALL_LDFLAGS) 
- 
- cnping_mac : cnping.c CNFGFunctions.c CNFGCocoaCGDriver.m os_generic.c ping.c httping.o
- 	gcc -o cnping $^ -x objective-c -framework Cocoa -framework QuartzCore -lm -lpthread
- 
- searchnet : os_generic.o ping.o searchnet.o
--	gcc $(CFLAGS) -o $@ $^ -lpthread
-+	$(CC) $(ALL_CFLAGS) -o $@ $^ -lpthread
- 
- linuxinstall : cnping
- 	sudo rm -f /usr/local/bin/cnping
diff --git a/srcpkgs/cnping/template b/srcpkgs/cnping/template
index 32922110e63..7c9d6e429f7 100644
--- a/srcpkgs/cnping/template
+++ b/srcpkgs/cnping/template
@@ -1,6 +1,6 @@
 # Template file for 'cnping'
 pkgname=cnping
-version=afcc565771a37978eb0b54e185fa80482cdebe3a
+version=1.0b2
 revision=1
 hostmakedepends="gcc make libcap-progs"
 makedepends="libXinerama-devel libX11-devel"
@@ -9,11 +9,10 @@ maintainer="Jan Christian Grünhage <jan.christian@gruenhage.xyz>"
 license="MIT"
 homepage="https://github.com/cnlohr/cnping"
 distfiles="https://github.com/cnlohr/cnping/archive/${version}.tar.gz"
-checksum=9320ec8e1a982c538e217940c57ed894c16ad1363b2070c5a96d94564f2a9606
+checksum=6dcdfe42b860ad57a2b10dc79a23e5d6af721a3677888af983fd0dea34a0f811
 
 do_build() {
-	make ${makejobs} CC="$CC" CFLAGS="$CFLAGS" \
-		LD="ld" LDFLAGS="$LDFLAGS"
+	make
 	setcap cap_net_raw=ep cnping
 }
 

  parent reply	other threads:[~2019-09-28 17:59 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-13725@inbox.vuxu.org>
2019-09-28 16:04 ` voidlinux-github
2019-09-28 16:04 ` voidlinux-github
2019-09-28 17:59 ` voidlinux-github
2019-09-28 17:59 ` voidlinux-github [this message]
2019-09-28 20:38 ` voidlinux-github
2019-09-28 20:38 ` voidlinux-github
2019-09-28 21:51 ` [PR PATCH] [Closed]: " voidlinux-github

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190928175912.MhUAnewF0k4SgLqYipHKsHqlHXDsg_-7ALlxewwKQwU@z \
    --to=voidlinux-github@inbox.vuxu.org \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).