summaryrefslogtreecommitdiffstats
path: root/x11/apwal/files
diff options
context:
space:
mode:
authorpav <pav@FreeBSD.org>2003-12-06 13:07:52 +0000
committerpav <pav@FreeBSD.org>2003-12-06 13:07:52 +0000
commit26999b18c966984ffe6c9cb29184e568c1b80d02 (patch)
treec91e57ac30b194dffc35fffc63600266121ac2e3 /x11/apwal/files
parent130d50ee3083beb6cf6ce9c94387a1ee026ca41b (diff)
downloadFreeBSD-ports-26999b18c966984ffe6c9cb29184e568c1b80d02.zip
FreeBSD-ports-26999b18c966984ffe6c9cb29184e568c1b80d02.tar.gz
Add apwal, a simple and powerful application launcher.
It is composed in 2 parts: the application launcher itself and a good looking easy to use editor. PR: ports/59940 Submitted by: Volker Stolz <stolz@i2.informatik.rwth-aachen.de>
Diffstat (limited to 'x11/apwal/files')
-rw-r--r--x11/apwal/files/group_member.c25
-rw-r--r--x11/apwal/files/patch-Makefile42
-rw-r--r--x11/apwal/files/patch-app.c10
-rw-r--r--x11/apwal/files/patch-sysstuff.c11
4 files changed, 88 insertions, 0 deletions
diff --git a/x11/apwal/files/group_member.c b/x11/apwal/files/group_member.c
new file mode 100644
index 0000000..3197feb
--- /dev/null
+++ b/x11/apwal/files/group_member.c
@@ -0,0 +1,25 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+
+int group_member(gid_t gid) {
+ gid_t *grouplist = NULL;
+ int res,i;
+
+ res = getgroups(0,NULL);
+ if (res >= 0) {
+ grouplist = calloc(sizeof(gid_t),res);
+ res = getgroups(res,grouplist);
+ if (res >=0) {
+ for(i=0;i<res;i++) {
+ if (grouplist[i] == gid) break;
+ }
+ }
+ }
+ if (res == -1) {
+ perror("Can't get number of groups!");
+ return -1;
+ } else {
+ return (i<res);
+ }
+}
diff --git a/x11/apwal/files/patch-Makefile b/x11/apwal/files/patch-Makefile
new file mode 100644
index 0000000..4a9219a
--- /dev/null
+++ b/x11/apwal/files/patch-Makefile
@@ -0,0 +1,42 @@
+--- Makefile.orig Wed Nov 26 11:46:50 2003
++++ Makefile Wed Nov 26 12:20:34 2003
+@@ -5,11 +5,11 @@
+ CFLAGS=-g -Wall -Werror `pkg-config --cflags gtk+-2.0 gthread-2.0` -DGTK_DISABLE_DEPRECATED -DAPWAL_DEBUG
+ LDFLAGS=`pkg-config --libs gtk+-2.0 gthread-2.0` `xml2-config --libs`
+ else
+-CFLAGS=-O2 `pkg-config --cflags gtk+-2.0 gthread-2.0`
+-LDFLAGS=-O2 `pkg-config --libs gtk+-2.0 gthread-2.0` `xml2-config --libs`
++CFLAGS+=`pkg-config --cflags gtk+-2.0 gthread-2.0`
++LDFLAGS+=`pkg-config --libs gtk+-2.0 gthread-2.0` `xml2-config --libs`
+ endif
+
+-OBJS=main.o app.o launcher.o editor.o property.o \
++OBJS=group_member.o main.o app.o launcher.o editor.o property.o \
+ gtkstuff.o sysstuff.o iconsel.o cereimg.o fromgtk2src/gtkmarshalers.o \
+ apwalapp.o iconsel_interface.o filesel.o xmlrc.o iconlist.o log.o about.o \
+ apwalpref.o
+@@ -28,7 +28,7 @@
+ else
+ all: apwal
+ apwal: $(OBJS)
+- gcc -o $@ $^ $(LDFLAGS)
++ $(CC) -o $@ $^ $(LDFLAGS)
+ strip $@
+ endif
+
+@@ -37,12 +37,12 @@
+ ln -sf /usr/local/bin/apwal /usr/local/bin/apwal-editor
+
+ .c.o: $(INCS)
+- gcc -c $< -o $*.o $(CFLAGS)
++ $(CC) -c $< -o $*.o $(CFLAGS)
+
+ xmlrc.o: xmlrc.c $(INCS)
+- gcc -c $< -o $*.o $(CFLAGS) `xml2-config --cflags`
++ $(CC) -c $< -o $*.o $(CFLAGS) `xml2-config --cflags`
+ about.o: about.c $(INCS) ../Makefile.inc
+- gcc -c $< -o $*.o $(CFLAGS) -DAPWAL_VERSION=\"$(VERS)\"
++ $(CC) -c $< -o $*.o $(CFLAGS) -DAPWAL_VERSION=\"$(VERS)\"
+
+ gtkstuff.o: pixbufinline.inc
+ xmlrc.o: xmlrcinline.inc
diff --git a/x11/apwal/files/patch-app.c b/x11/apwal/files/patch-app.c
new file mode 100644
index 0000000..e17a316
--- /dev/null
+++ b/x11/apwal/files/patch-app.c
@@ -0,0 +1,10 @@
+--- app.c.orig Wed Nov 26 11:50:10 2003
++++ app.c Wed Nov 26 11:50:23 2003
+@@ -18,6 +18,7 @@
+ */
+
+
++#include <sys/types.h>
+ #include "common.h"
+ #include <string.h>
+
diff --git a/x11/apwal/files/patch-sysstuff.c b/x11/apwal/files/patch-sysstuff.c
new file mode 100644
index 0000000..a32889b
--- /dev/null
+++ b/x11/apwal/files/patch-sysstuff.c
@@ -0,0 +1,11 @@
+--- sysstuff.c.orig Wed Dec 3 09:58:17 2003
++++ sysstuff.c Wed Dec 3 09:58:45 2003
+@@ -370,7 +370,7 @@
+ len = strlen(procfile);
+ pid = getpid();
+ sprintf(procfile + len, "%d", pid);
+- strcat(procfile, "/exe");
++ strcat(procfile, "/file");
+
+ // read procfile to get the binary file of apwal
+ cc = readlink(procfile, execfile, FILENAME_MAX);
OpenPOWER on IntegriCloud