summaryrefslogtreecommitdiff
path: root/homebrew/fakeroot
diff options
context:
space:
mode:
Diffstat (limited to 'homebrew/fakeroot')
-rw-r--r--homebrew/fakeroot/.beer64
-rw-r--r--homebrew/fakeroot/.make.sh-auto22
-rw-r--r--homebrew/fakeroot/_metadata/description1
-rw-r--r--homebrew/fakeroot/_metadata/homepage1
-rw-r--r--homebrew/fakeroot/_metadata/name1
-rw-r--r--homebrew/fakeroot/_metadata/version1
-rwxr-xr-xhomebrew/fakeroot/download.sh1
-rwxr-xr-xhomebrew/fakeroot/patches.sh16
8 files changed, 107 insertions, 0 deletions
diff --git a/homebrew/fakeroot/.beer b/homebrew/fakeroot/.beer
new file mode 100644
index 000000000..4634c1834
--- /dev/null
+++ b/homebrew/fakeroot/.beer
@@ -0,0 +1,64 @@
+{
+ "name": "Fakeroot",
+ "description": "Provide a fake root environment",
+ "url": "https://deb.debian.org/debian/pool/main/f/fakeroot/fakeroot_1.23.orig.tar.xz",
+ "mirror": null,
+ "homepage": "https://tracker.debian.org/pkg/fakeroot",
+ "depends": [],
+ "resource": [],
+ "conflicts": [],
+ "patches": [
+ {
+ "url": "https://bugs.debian.org/cgi-bin/bugreport.cgi?msg=5;filename=0001-Implement-openat-2-wrapper-which-handles-optional-ar.patch;att=1;bug=766649",
+ "strip": "1"
+ },
+ {
+ "url": "https://bugs.debian.org/cgi-bin/bugreport.cgi?msg=5;filename=0002-OS-X-10.10-introduced-id_t-int-in-gs-etpriority.patch;att=2;bug=766649",
+ "strip": "1"
+ },
+ {
+ "url": null,
+ "data": [
+ "index 15fdd1d..29d738d 100644\n",
+ "--- a/libfakeroot.c\n",
+ "+++ b/libfakeroot.c\n",
+ "@@ -2446,6 +2446,6 @@ int openat(int dir_fd, const char *pathname, int flags, ...)\n",
+ " va_end(args);\n",
+ " return next_openat(dir_fd, pathname, flags, mode);\n",
+ " }\n",
+ "- return next_openat(dir_fd, pathname, flags);\n",
+ "+ return next_openat(dir_fd, pathname, flags, NULL);\n",
+ " }\n",
+ " #endif\n"
+ ]
+ }
+ ],
+ "install": [
+ "system \"./configure\", \"--disable-dependency-tracking\",",
+ "\"--disable-static\",",
+ "\"--disable-silent-rules\",",
+ "\"--prefix=#{prefix}\"",
+ "system \"make\", \"wraptmpf.h\"",
+ "(buildpath/\"patch-for-wraptmpf-h\").write <<~EOS",
+ "diff --git a/wraptmpf.h b/wraptmpf.h",
+ "index dbfccc9..0e04771 100644",
+ "--- a/wraptmpf.h",
+ "+++ b/wraptmpf.h",
+ "@@ -575,6 +575,10 @@ static __inline__ int next_mkdirat (int dir_fd, const char *pathname, mode_t mod",
+ "#endif /* HAVE_MKDIRAT */",
+ "#ifdef HAVE_OPENAT",
+ "extern int openat (int dir_fd, const char *pathname, int flags, ...);",
+ "+static __inline__ int next_openat (int dir_fd, const char *pathname, int flags, mode_t mode) __attribute__((always_inline));",
+ "+static __inline__ int next_openat (int dir_fd, const char *pathname, int flags, mode_t mode) {",
+ "+ return openat (dir_fd, pathname, flags, mode);",
+ "+}",
+ "#endif /* HAVE_OPENAT */",
+ "#ifdef HAVE_RENAMEAT",
+ "EOS",
+ "system \"patch < patch-for-wraptmpf-h\"",
+ "system \"make\"",
+ "system \"make\", \"install\""
+ ],
+ "version": "1.23",
+ "file": "fakeroot.rb"
+} \ No newline at end of file
diff --git a/homebrew/fakeroot/.make.sh-auto b/homebrew/fakeroot/.make.sh-auto
new file mode 100644
index 000000000..3862cc250
--- /dev/null
+++ b/homebrew/fakeroot/.make.sh-auto
@@ -0,0 +1,22 @@
+pkg:setup
+pkg:configure --disable-dependency-tracking --disable-static --disable-silent-rules
+make wraptmpf.h
+(buildpath/"patch-for-wraptmpf-h").write <<~EOS
+diff --git a/wraptmpf.h b/wraptmpf.h
+index dbfccc9..0e04771 100644
+--- a/wraptmpf.h
++++ b/wraptmpf.h
+@@ -575,6 +575,10 @@ static __inline__ int next_mkdirat (int dir_fd, const char *pathname, mode_t mod
+#endif /* HAVE_MKDIRAT */
+#ifdef HAVE_OPENAT
+extern int openat (int dir_fd, const char *pathname, int flags, ...);
++static __inline__ int next_openat (int dir_fd, const char *pathname, int flags, mode_t mode) __attribute__((always_inline));
++static __inline__ int next_openat (int dir_fd, const char *pathname, int flags, mode_t mode) {
++ return openat (dir_fd, pathname, flags, mode);
++}
+#endif /* HAVE_OPENAT */
+#ifdef HAVE_RENAMEAT
+EOS
+patch < patch-for-wraptmpf-h
+make
+make DESTDIR=${PKG_DEST} install
diff --git a/homebrew/fakeroot/_metadata/description b/homebrew/fakeroot/_metadata/description
new file mode 100644
index 000000000..93b80bad1
--- /dev/null
+++ b/homebrew/fakeroot/_metadata/description
@@ -0,0 +1 @@
+Provide a fake root environment
diff --git a/homebrew/fakeroot/_metadata/homepage b/homebrew/fakeroot/_metadata/homepage
new file mode 100644
index 000000000..1edd31aa1
--- /dev/null
+++ b/homebrew/fakeroot/_metadata/homepage
@@ -0,0 +1 @@
+https://tracker.debian.org/pkg/fakeroot
diff --git a/homebrew/fakeroot/_metadata/name b/homebrew/fakeroot/_metadata/name
new file mode 100644
index 000000000..d999f2b67
--- /dev/null
+++ b/homebrew/fakeroot/_metadata/name
@@ -0,0 +1 @@
+Fakeroot
diff --git a/homebrew/fakeroot/_metadata/version b/homebrew/fakeroot/_metadata/version
new file mode 100644
index 000000000..a1b6e17d6
--- /dev/null
+++ b/homebrew/fakeroot/_metadata/version
@@ -0,0 +1 @@
+1.23
diff --git a/homebrew/fakeroot/download.sh b/homebrew/fakeroot/download.sh
new file mode 100755
index 000000000..da0f06e95
--- /dev/null
+++ b/homebrew/fakeroot/download.sh
@@ -0,0 +1 @@
+wget https://deb.debian.org/debian/pool/main/f/fakeroot/fakeroot_1.23.orig.tar.xz \ No newline at end of file
diff --git a/homebrew/fakeroot/patches.sh b/homebrew/fakeroot/patches.sh
new file mode 100755
index 000000000..0f02ef758
--- /dev/null
+++ b/homebrew/fakeroot/patches.sh
@@ -0,0 +1,16 @@
+wget https://bugs.debian.org/cgi-bin/bugreport.cgi?msg=5;filename=0001-Implement-openat-2-wrapper-which-handles-optional-ar.patch;att=1;bug=766649
+wget https://bugs.debian.org/cgi-bin/bugreport.cgi?msg=5;filename=0002-OS-X-10.10-introduced-id_t-int-in-gs-etpriority.patch;att=2;bug=766649
+echo 'Creating brew-patch.diff'
+cat << EOF >> brew-patch.diff
+index 15fdd1d..29d738d 100644
+--- a/libfakeroot.c
++++ b/libfakeroot.c
+@@ -2446,6 +2446,6 @@ int openat(int dir_fd, const char *pathname, int flags, ...)
+ va_end(args);
+ return next_openat(dir_fd, pathname, flags, mode);
+ }
+- return next_openat(dir_fd, pathname, flags);
++ return next_openat(dir_fd, pathname, flags, NULL);
+ }
+ #endif
+EOF