summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authornytpu2021-09-03 18:25:21 -0600
committernytpu2021-09-03 19:44:39 -0600
commit8b288f576e2f34e264091d30514cb3d9ba7fa680 (patch)
tree839a9809ba9253dacd375cecfa55476d1aeee7c6
downloadaur-8b288f576e2f34e264091d30514cb3d9ba7fa680.tar.gz
upgpkg: factor-hidpi-git 0.98.r1822.d07d256748-1
-rw-r--r--.SRCINFO30
-rw-r--r--.gitignore4
-rw-r--r--PKGBUILD92
-rw-r--r--factor.desktop8
-rw-r--r--fix-dpi.patch12
5 files changed, 146 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..741290828372
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,30 @@
+pkgbase = factor-hidpi-git
+ pkgdesc = A general purpose, dynamically typed, stack-based programming language. Patched to function on HiDPI displays.
+ pkgver = 0.98.r1822.d07d256748
+ pkgrel = 1
+ url = http://factorcode.org
+ arch = i686
+ arch = x86_64
+ license = BSD
+ makedepends = git
+ depends = pango
+ depends = cairo
+ depends = glib2
+ depends = freetype2
+ depends = mesa
+ depends = libgl
+ depends = gtkglext
+ optdepends = udis86
+ provides = factor
+ provides = factor-vm
+ conflicts = factor
+ conflicts = factor-git
+ options = !strip
+ source = git+https://github.com/factor/factor.git
+ source = factor.desktop
+ source = fix-dpi.patch
+ md5sums = SKIP
+ md5sums = 59242ddb19a9be927915e489e2bfca27
+ md5sums = 78562de4b6fbdfac99368d0d1935e1f1
+
+pkgname = factor-hidpi-git
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..6e52a0307cda
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+/factor
+/pkg
+/src
+factor-git-*
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..143197f89be2
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,92 @@
+# Maintainer: nytpu <alex at nytpu dot com>
+#
+# This tracks factor-git: <https://aur.archlinux.org/packages/factor-git/>
+# Maintainer: Sergii Fesenko <megapoliss@ukr.net>
+# Contributor: Alain Kalker <a.c.kalker@gmail.com>
+# Contributor: jedahu <jedahu@gmail.com>
+# Contributor: Leonidas <marek@xivilization.net>
+
+pkgname=factor-hidpi-git
+_pkgname=factor
+pkgver=0.98.r1822.d07d256748
+pkgrel=1
+pkgdesc="A general purpose, dynamically typed, stack-based programming language. Patched to function on HiDPI displays."
+arch=(i686 x86_64)
+url="http://factorcode.org"
+license=(BSD)
+provides=(factor factor-vm)
+conflicts=(factor factor-git)
+depends=(pango cairo glib2 freetype2 mesa libgl gtkglext)
+optdepends=(udis86)
+makedepends=(git)
+options=(!strip)
+source=(
+ 'git+https://github.com/factor/factor.git'
+ 'factor.desktop'
+ 'fix-dpi.patch'
+ )
+
+pkgver() {
+ cd "${_pkgname}"
+ git describe --tags --long | sed 's/-/.r/; s/-g/./'
+}
+
+md5sums=('SKIP'
+ '59242ddb19a9be927915e489e2bfca27'
+ '78562de4b6fbdfac99368d0d1935e1f1')
+
+prepare() {
+ cd "$srcdir/$_pkgname"
+ patch --forward --strip=1 --input="${srcdir}/fix-dpi.patch"
+ git ci -am "fix DPI issues on HiDPI displays" # build.sh doesn't work with unstaged changes
+}
+
+build() {
+ cd "$srcdir/$_pkgname"
+
+ if [[ ! -f checksums.txt ]]; then
+ # update done by ./build.sh
+ msg "Running factor update script...."
+ git checkout master # factor dislikes the "makepkg" branch
+ git branch -D makepkg || true
+ #./build.sh quick-update
+ #./build.sh self-update
+ ./build.sh update
+ else
+ msg "Running factor bootstrap script...."
+ ./build.sh net-bootstrap
+ fi
+}
+
+package() {
+ mkdir -p $pkgdir/usr/bin
+ mkdir -p $pkgdir/usr/lib/factor
+ mkdir -p $pkgdir/usr/share/doc/$pkgname/
+ mkdir -p $pkgdir/usr/share/licenses/$pkgname/
+
+ # copy over the stdlib
+ cd "$srcdir/$_pkgname"
+ cp -a misc extra core basis factor.image $pkgdir/usr/lib/factor/
+ # copy over libs
+ cp libfactor.a libfactor-ffi-test.so $pkgdir/usr/lib/factor/
+ # copy over docs
+ cp README.md $pkgdir/usr/share/doc/$pkgname/
+ # make folders r+x and files r
+ chmod -R 0755 $pkgdir/usr/lib/factor
+ find $pkgdir/usr/lib/factor -type f -exec chmod -x {} \;
+
+ # copy over the actual binary and create a symlink called factor-vm
+ # (otherwise it conflicts with factor from the GNU coreutils)
+ cp -a factor $pkgdir/usr/lib/factor/factor
+ cd $pkgdir/usr/bin
+ ln -s ../lib/factor/factor factor-vm
+ cd -
+
+ # copy over the license (as defined in Arch Packaging Standards)
+ chmod -x LICENSE.txt
+ cp LICENSE.txt $pkgdir/usr/share/licenses/$pkgname/COPYING
+
+ # add the desktop entry and icon
+ install -D "$srcdir"/factor.desktop "$pkgdir"/usr/share/applications/factor.desktop
+ install -D misc/icons/Factor.svg "$pkgdir"/usr/share/pixmaps/factor.svg
+}
diff --git a/factor.desktop b/factor.desktop
new file mode 100644
index 000000000000..a9a0aeaca7e6
--- /dev/null
+++ b/factor.desktop
@@ -0,0 +1,8 @@
+[Desktop Entry]
+Type=Application
+Version=1.0
+Name=Factor
+Comment=Factor is a general purpose, dynamically typed, stack-based programming language
+Categories=Development;
+Icon=factor
+Exec=factor-vm
diff --git a/fix-dpi.patch b/fix-dpi.patch
new file mode 100644
index 000000000000..4404aacb39f6
--- /dev/null
+++ b/fix-dpi.patch
@@ -0,0 +1,12 @@
+diff --color --unified --recursive --text factor.orig/basis/ui/text/pango/pango.factor factor.new/basis/ui/text/pango/pango.factor
+--- factor.orig/basis/ui/text/pango/pango.factor 2021-09-03 18:17:13.817228871 -0600
++++ factor.new/basis/ui/text/pango/pango.factor 2021-09-03 18:18:09.125171618 -0600
+@@ -29,7 +29,7 @@
+
+ SYMBOL: dpi
+
+-72 dpi set-global
++144 dpi set-global
+
+ : set-layout-font ( font layout -- )
+ swap cache-font-description pango_layout_set_font_description ;