depot/third_party/nixpkgs/pkgs/tools/misc/rig/rig_1.11-1.diff
Default email 8ac5e011d6 Project import generated by Copybara.
GitOrigin-RevId: 2c3273caa153ee8eb5786bc8141b85b859e7efd7
2020-04-24 19:36:52 -04:00

39 lines
1,004 B
Diff

--- rig-1.11.orig/Makefile
+++ rig-1.11/Makefile
@@ -1,20 +1,21 @@
-PREFIX=/usr/local
+PREFIX=${out}
BINDIR=${PREFIX}/bin
MANDIR=${PREFIX}/man
DATADIR=${PREFIX}/share/rig
+CXX=g++
all: rig rig.6
rig: rig.cc
- g++ -g rig.cc -o rig -Wall -DDATADIR="\"$(DATADIR)\""
+ ${CXX} -O2 -g rig.cc -o rig -Wall -DDATADIR="\"$(DATADIR)\""
rig.6: rig.6.in
sed s@DATADIR@"$(DATADIR)"@g < rig.6.in > rig.6
install: rig rig.6
- install -g 0 -m 755 -o 0 -s rig $(BINDIR)
- install -g 0 -m 644 -o 0 rig.6 $(MANDIR)/man6/rig.6
- install -g 0 -m 755 -o 0 -d $(DATADIR)
- install -g 0 -m 644 -o 0 data/*.idx $(DATADIR)
+ install -m 755 -d $(DESTDIR)$(DATADIR)
+ install -m 755 -d $(DESTDIR)$(BINDIR)
+ install -m 755 rig $(DESTDIR)$(BINDIR)/rig
+ install -m 644 data/*.idx $(DESTDIR)$(DATADIR)
clean:
rm -rf *~ *.rej *.orig *.o rig rig.6
--- rig-1.11.orig/rig.cc
+++ rig-1.11/rig.cc
@@ -26,6 +26,7 @@
#include <time.h>
#include <errno.h>
#include <assert.h>
+#include <string.h>
using namespace std;