Commit 344e3ce3 authored by Satadru Pramanik's avatar Satadru Pramanik

rebuild gemacs from features/pgtk and add libotf dep

parent eaec04fa
...@@ -3,53 +3,90 @@ require 'package' ...@@ -3,53 +3,90 @@ require 'package'
class Gemacs < Package class Gemacs < Package
description 'An extensible, customizable, free/libre text editor - and more.' description 'An extensible, customizable, free/libre text editor - and more.'
homepage 'https://www.gnu.org/software/emacs/' homepage 'https://www.gnu.org/software/emacs/'
@_ver = '27.1' @_ver = '28.0.50.1'
version "#{@_ver}-2" version "#{@_ver}-7a7b"
compatibility 'all' compatibility 'all'
source_url "https://ftpmirror.gnu.org/emacs/emacs-#{@_ver}.tar.xz" source_url 'file:///dev/null'
source_sha256 '4a4c128f915fc937d61edfc273c98106711b540c9be3cd5d2e2b9b5b2f172e41' source_sha256 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855'
binary_url({ binary_url({
aarch64: 'https://dl.bintray.com/chromebrew/chromebrew/gemacs-27.1-2-chromeos-armv7l.tar.xz', aarch64: 'https://dl.bintray.com/chromebrew/chromebrew/gemacs-28.0.50.1-7a7b-chromeos-armv7l.tar.xz',
armv7l: 'https://dl.bintray.com/chromebrew/chromebrew/gemacs-27.1-2-chromeos-armv7l.tar.xz', armv7l: 'https://dl.bintray.com/chromebrew/chromebrew/gemacs-28.0.50.1-7a7b-chromeos-armv7l.tar.xz',
i686: 'https://dl.bintray.com/chromebrew/chromebrew/gemacs-27.1-2-chromeos-i686.tar.xz', i686: 'https://dl.bintray.com/chromebrew/chromebrew/gemacs-28.0.50.1-7a7b-chromeos-i686.tar.xz',
x86_64: 'https://dl.bintray.com/chromebrew/chromebrew/gemacs-27.1-2-chromeos-x86_64.tar.xz' x86_64: 'https://dl.bintray.com/chromebrew/chromebrew/gemacs-28.0.50.1-7a7b-chromeos-x86_64.tar.xz'
}) })
binary_sha256({ binary_sha256({
aarch64: '270c65753da8ff73172aaecf8696eef4645204904d2345620ea54d24a880a814', aarch64: '74066f8609ca1403609962454feff1a85aedb24a3d56dbfcae4a3aad8d00f836',
armv7l: '270c65753da8ff73172aaecf8696eef4645204904d2345620ea54d24a880a814', armv7l: '74066f8609ca1403609962454feff1a85aedb24a3d56dbfcae4a3aad8d00f836',
i686: '2b94b8c5016dbf1e39cdaf4d78e8678a9414232bac93701e0ba2e10e7864b428', i686: '401243600795df8a6c375a7e581b939e258d1697595e9a43573860fca34656c0',
x86_64: '5055031715b416892f0da3c5d3faf0ff535e1ca74d57be96e8d2c0956de79794' x86_64: '702ac1d56095b1032d387a2e4736e6f8ac49d4d16a165cbc1142cb5ffe394454'
}) })
depends_on 'alsa_lib'
depends_on 'cairo'
depends_on 'giflib' depends_on 'giflib'
depends_on 'gpm'
depends_on 'gtk3'
depends_on 'harfbuzz'
depends_on 'jansson'
depends_on 'libjpeg' depends_on 'libjpeg'
depends_on 'libotf'
depends_on 'libpng' depends_on 'libpng'
depends_on 'librsvg'
depends_on 'libtiff' depends_on 'libtiff'
depends_on 'imagemagick7' depends_on 'texinfo'
depends_on 'sommelier' depends_on 'webkit2gtk'
def self.prebuild
@git_dir = 'emacs_git'
@git_branch = 'feature/pgtk'
@git_hash = '7a7bc15242896b20c7af49f77f0e22c3d78e4d88'
@git_url = 'https://git.savannah.gnu.org/git/emacs.git'
FileUtils.rm_rf(@git_dir)
FileUtils.mkdir_p(@git_dir)
Dir.chdir @git_dir do
system 'git init'
system "git remote add origin #{@git_url}"
system "git remote set-branches origin '#{@git_branch}'"
system "git fetch --depth 1 origin #{@git_hash}"
system 'git checkout FETCH_HEAD'
end
end
def self.build def self.build
system "env CFLAGS='-pipe -flto=auto' CXXFLAGS='-pipe -flto=auto' \ Dir.chdir 'emacs_git' do
system 'NOCONFIGURE=1 ./autogen.sh'
system "env CFLAGS='-pipe -fuse-ld=gold -flto=auto' CXXFLAGS='-pipe -fuse-ld=gold -flto=auto' \
LDFLAGS='-flto=auto' \ LDFLAGS='-flto=auto' \
./configure \ ./configure \
--prefix=#{CREW_PREFIX} \ --enable-link-time-optimization \
--localstatedir=#{CREW_PREFIX}/share \ --localstatedir=#{CREW_PREFIX}/share \
--without-selinux \ --prefix=#{CREW_PREFIX} \
--with-modules \ --with-cairo \
--with-imagemagick \ --with-gif=ifavailable \
--with-x=yes \
--with-x-toolkit=gtk3 \
--with-gif=yes \
--with-jpeg=yes \ --with-jpeg=yes \
--with-modules \
--with-native-compilation \
--without-gconf \
--without-gsettings \
--without-selinux \
--without-x \
--with-pgtk \
--with-png=yes \ --with-png=yes \
--with-rsvg=yes" --with-rsvg=yes \
--with-sound=alsa \
--with-tiff=ifavailable \
--with-x-toolkit=gtk3 \
--with-xwidgets"
system 'make' system 'make'
end end
end
def self.install def self.install
Dir.chdir 'emacs_git' do
system 'make', "DESTDIR=#{CREW_DEST_DIR}", 'install' system 'make', "DESTDIR=#{CREW_DEST_DIR}", 'install'
system "install -Dm755 src/emacs #{CREW_DEST_PREFIX}/bin/gemacs" system "install -Dm755 src/emacs #{CREW_DEST_PREFIX}/bin/gemacs"
system "install -Dm755 src/emacs-27.1.1 #{CREW_DEST_PREFIX}/bin/gemacs-27.1.1" system "install -Dm755 src/emacs-#{@_ver} #{CREW_DEST_PREFIX}/bin/gemacs-#{@_ver}"
end
end end
end end
require 'package'
class Libotf < Package
description 'OpenType Font library'
homepage 'https://www.nongnu.org/m17n/'
version '0.9.16'
compatibility 'all'
source_url 'https://download.savannah.gnu.org/releases/m17n/libotf-0.9.16.tar.gz'
source_sha256 '68db0ca3cda2d46a663a92ec26e6eb5adc392ea5191bcda74268f0aefa78066b'
binary_url({
aarch64: 'https://dl.bintray.com/chromebrew/chromebrew/libotf-0.9.16-chromeos-armv7l.tar.xz',
armv7l: 'https://dl.bintray.com/chromebrew/chromebrew/libotf-0.9.16-chromeos-armv7l.tar.xz',
i686: 'https://dl.bintray.com/chromebrew/chromebrew/libotf-0.9.16-chromeos-i686.tar.xz',
x86_64: 'https://dl.bintray.com/chromebrew/chromebrew/libotf-0.9.16-chromeos-x86_64.tar.xz'
})
binary_sha256({
aarch64: '48ea420876299f2de783c250b6def3c2a87e7bf8c16695a63b7561efbb9594f8',
armv7l: '48ea420876299f2de783c250b6def3c2a87e7bf8c16695a63b7561efbb9594f8',
i686: '487c98f04bdc12c06a2afd32087222150ee652d9fc3c6233daee341c41718406',
x86_64: '8ec1c9f4e8b99482323e3bf444cca95b5e3d0abb90b8ea278d1461b29470e340'
})
depends_on 'libxaw'
depends_on 'freetype'
def self.patch
system 'curl -Ls https://github.com/archlinux/svntogit-packages/raw/a67b940a19f1e7e47e7d8553ed31158ed70f1286/libotf/trunk/replace-freetype-config.patch | patch -p1 -b'
end
def self.build
system 'autoreconf -i'
system "env CFLAGS='-pipe -fno-stack-protector -U_FORTIFY_SOURCE -flto=auto' \
CXXFLAGS='-pipe -fno-stack-protector -U_FORTIFY_SOURCE -flto=auto' \
LDFLAGS='-fno-stack-protector -U_FORTIFY_SOURCE -flto=auto' \
./configure #{CREW_OPTIONS}"
system 'make'
end
def self.install
system "make DESTDIR=#{CREW_DEST_DIR} install"
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment