You are not logged in.

#1 2021-03-31 19:57:27

AlecStewart1
Member
Registered: 2021-03-31
Posts: 8

PKGBUILD Review Request: Update Racket to Version 8.0, & Gambit-C

Hello, I've noticed that the Racket package in the community repo has yet to be updated to version 8.0, the new and stable version.
However, I used the `builtpkgs` version here being that it's recommended by the Racket maintainer folks and I don't know if that's what
should be used.

# Obviously, the maintainer would be changed to the actual maintainer of the Racket package.
# And some naming would be changed.
# Maintainer: Alec Stewart <alec.stewart1000@gmail.com>

pkgbase=racket-builtpkgs
pkgname=(racket-builtpkgs racket-minimal-builtpkgs)
pkgver=8.0
pkgrel=0
pkgdesc="A full-spectrum language with DrRacket IDE.  Formerly known as PLT Scheme. The builtpkgs source."
arch=('x86_64')
url="https://racket-lang.org/"
license=('Apache' 'GPL3' 'LGPL3' 'custom')
depends=('gtk3')
makedepends=('gsfonts' 'sqlite')
options=('!strip' '!emptydirs')
conflicts=('racket-docs') # <-- I don't even think this package exists anymore
replaces=('racket-docs')
#
# 8.0 is out with Racket-CS as the default implementation.
# The source + built packages distribution is recommended, as stated on the
# Racket download page:
# "
#  The Source + built packages distribution includes pre-built,
#  platform-independent bytecode; it installs much faster than
#  plain source, and it is also compatible with fast installs of
#  additional Racket packages.
# "
#
source=("https://download.racket-lang.org/releases/${pkgver}/installers/${pkgname}-${pkgver}-src-builtpkgs.tgz")
sha1sums=('9a713b45bc82f5dc1f617c5957581505e2a2aafd')

prepare() {
    cd "$pkgbase-$pkgver"
    echo "Icon=drracket" >>share/pkgs/drracket/drracket/drracket.desktop
}

build() {
    cd "$pkgbase-$pkgver/src"
    [ "$CARCH" == "x86_64" ] && export CFLAGS+="-march=native -mtune=native -fPIC"
    ./configure --prefix=/usr --sysconfdir=/etc --enable-shared
    make -j$(nproc)
}

package_racket-builtpkgs() {
    cd "$pkgbase-$pkgver/src"
    make DESTDIR="$pkgdir" install

    install -Dm644 -t "$pkgdir/usr/share/licenses/$pkgname/" LICENSE*.txt
    install -Dm644 ../share/pkgs/drracket/drracket/drracket.desktop "$pkgdir/usr/share/applications/drracket.desktop"
    install -d "$pkgdir"/usr/share/icons/hicolor/scalable/apps
    ln -s /usr/share/racket/pkgs/icons/racket-logo.svg "$pkgdir/usr/share/icons/hicolor/scalable/apps/drracket.svg"
}

package_racket-minimal-builtpkgs() {
    #
    # There is no reason to not use the direct link to the minimal distribution download link.
    # Again, the source + built packages distribution is recommended.
    #
    pkgdesc="Minimal Racket installation, without DrRacket/docs. The builtpkgs source."
    depends=('libffi')
    source=("https://download.racket-lang.org/releases/${pkgver}/installers/${pkgname}-minimal-${pkgver}-src-builtpkgs.tgz")
    sha1sums=('b1e1e8b9755f42f19923d3e13a12ff35e5c11035')
    cd "$pkgbase-$pkgver"

    make DESTDIR="${pkgdir}" install

    install -Dm644 -t "$pkgdir/usr/share/licenses/$pkgname/" LICENSE*.txt
}

Then there's the modified gambit-c package, which I modified in order to allow for debugging and for autodoc when editing with Emacs + Geiser. Also, this makes it better
to more easily build Gerbil Scheme.

# Maintainer: Alexander F. Rødseth <xyproto@archlinux.org>
# Contributor: Christian Babeux <christian.babeux@0x80.ca>
# Contributor: Alec Stewart <alec.stewart1000@gmail.com>

pkgname=gambit-c
pkgver=4.9.3
pkgrel=2
pkgdesc='Efficient implementation of the Scheme programming language'
arch=(x86_64)
url='https://github.com/gambit/gambit'
license=(LGPL Apache)
depends=('openssl')
options=(staticlibs)
makedepends=(git)
source=("$pkgname-$pkgver.tgz::https://www.iro.umontreal.ca/~${pkgname%-c}/download/${pkgname%-c}/v${pkgver%.*}/source/${pkgname/-c/-v}${pkgver//./_}-devel.tgz")
sha256sums=('4321ea0042f349eef673d2607a39c24f72e223aaf63f60298fffb7365f60fe53')

build() {
    cd "${pkgname/-c/-v}${pkgver//./_}-devel"
    # To allow for autodoc for the interactive repl
    ./configure \
        --prefix=/usr \
        --docdir=/usr/share/doc/gambit-c \
        --infodir=/usr/share/info \
        --libdir=/usr/lib/gambit-c \
        --enable-gcc-opts \
        --enable-single-host \
        --enable-multiple-version \
        --enable-openssl \
        --enable-default-runtime-options=f8,-8,t8 \
        --enable-poll \
        --enable-debug \
        --enable-rtlib-debug-source
    make -j
    make bootstrap
    make bootclean
    make check
    make doc
}

package() {
    make -C "${pkgname/-c/-v}${pkgver//./_}-devel" install DESTDIR="$pkgdir"

    # /usr/bin/gsc conflicts with ghostscript
    mv "$pkgdir/usr/bin/gsc" "$pkgdir/usr/bin/gambitc"
    ln -sf /usr/bin/gambitc "$pkgdir/usr/bin/gsc-script"
}

# getver: github.com/gambit/gambit/releases/latest
# vim: ts=2 sw=2 et:

Both of the above work on my system just fine.

Then of course is the matter of how I would purpose to push these changes to the community repo. Not sure how I go about that.

Last edited by AlecStewart1 (2021-03-31 20:00:12)

Offline

#2 2021-03-31 22:31:51

loqs
Member
Registered: 2014-03-06
Posts: 13,184

Re: PKGBUILD Review Request: Update Racket to Version 8.0, & Gambit-C

    [ "$CARCH" == "x86_64" ] && export CFLAGS+="-march=native -mtune=native -fPIC"

Changing this from

  [ "$CARCH" == "x86_64" ] && export CFLAGS+=" -fPIC"

Will make the package incompatible with any architecture older than that used to build the package.

    make -j$(nproc)

This ignores the value configured in makepkg.conf,  please do not do that.

package_racket-minimal-builtpkgs() {
    #
    # There is no reason to not use the direct link to the minimal distribution download link.
    # Again, the source + built packages distribution is recommended.
    #
    pkgdesc="Minimal Racket installation, without DrRacket/docs. The builtpkgs source."
    depends=('libffi')
    source=("https://download.racket-lang.org/releases/${pkgver}/installers/${pkgname}-minimal-${pkgver}-src-builtpkgs.tgz")
    sha1sums=('b1e1e8b9755f42f19923d3e13a12ff35e5c11035')
    cd "$pkgbase-$pkgver"
makepkg -Codd
==> ERROR: source can not be set inside a package function
==> ERROR: sha1sums can not be set inside a package function
AlecStewart1 wrote:

Both of the above work on my system just fine.

Offline

#3 2021-04-01 16:57:44

AlecStewart1
Member
Registered: 2021-03-31
Posts: 8

Re: PKGBUILD Review Request: Update Racket to Version 8.0, & Gambit-C

Ah, my mistake(s). Thank you.

First time writing an actual PKGBUILD.

I made those changes in the package_racket-minimal function because I thought was was in the current racket package PKGBUILD was kinda janky. But now I see why it was done.

Last edited by AlecStewart1 (2021-04-01 16:58:04)

Offline

#4 2021-04-01 17:22:16

loqs
Member
Registered: 2014-03-06
Posts: 13,184

Re: PKGBUILD Review Request: Update Racket to Version 8.0, & Gambit-C

I removed the source and checksum entry from package_racket-minimal-builtpkgs() but now it fails with:

makepkg --verifysource 
==> Making package: racket-builtpkgs 8.0-0 (Thu 01 Apr 2021 15:18:56 UTC)
==> Retrieving sources...
  -> Downloading racket-builtpkgs-8.0-src-builtpkgs.tgz...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100   268  100   268    0     0    258      0  0:00:01  0:00:01 --:--:--     0
  0   251    0     0    0     0      0      0 --:--:--  0:00:01 --:--:--     0
curl: (22) The requested URL returned error: 404
==> ERROR: Failure while downloading https://download.racket-lang.org/releases/8.0/installers/racket-builtpkgs-8.0-src-builtpkgs.tgz
    Aborting...

Edit:

#
# 8.0 is out with Racket-CS as the default implementation.
# The source + built packages distribution is recommended, as stated on the
# Racket download page:
# "
#  The Source + built packages distribution includes pre-built,
#  platform-independent bytecode; it installs much faster than
#  plain source, and it is also compatible with fast installs of
#  additional Racket packages.
# "
#

What download page contains the above statement?  I could not find it on:
https://download.racket-lang.org/
https://download.racket-lang.org/releases/8.0/
https://download.racket-lang.org/all-versions.html

The top level README inside racket-8.0-src-builtpkgs.tgz contains a section:

This distribution provides source for the Racket run-time system;
for build and installation instructions, see "src/README.txt".
Besides the run-time system's source, the distribution provides
pre-built versions of the core Racket bytecode, as well as pre-built
versions of included packages and documentation --- which makes it
suitable for quick installation on a Unix platform for which
executable binaries are not already provided.
This option is recommended for ARM.

The top level README inside racket-8.0-src.tgz has in that section:

This distribution provides source for the Racket run-time system;
for build and installation instructions, see "src/README.txt".
(The distribution also includes the core Racket collections and any
installed packages in source form.)

Last edited by loqs (2021-04-01 17:49:51)

Offline

#5 2021-04-01 18:05:41

AlecStewart1
Member
Registered: 2021-03-31
Posts: 8

Re: PKGBUILD Review Request: Update Racket to Version 8.0, & Gambit-C

Oh, well, yes.

You'd need to change the pkgname to

pkgname=(racket racket-minimal)

Also, how do I go about changing the sha1sum for the racket-minimal package?
Would it just be better to create an entirely separate PKGBUILD for it?
It seems to be causing most of the issues.

I also realize I need to change the actual build() function to get it working properly and as the
build instructions Racket CS provides.

Shouldn't take much to fix, I'm just trying the manual build process first before I change things in the PKGBUILD.

Offline

#6 2021-04-01 22:08:59

AlecStewart1
Member
Registered: 2021-03-31
Posts: 8

Re: PKGBUILD Review Request: Update Racket to Version 8.0, & Gambit-C

Alright, I'm getting annoyed now.

I'm getting a fail on package() with this:

# Maintainer: Alec Stewart <alec.stewart1000@gmail.com>

pkgname=racket
pkgver=8.0
pkgrel=0
pkgdesc="A full-spectrum language with DrRacket IDE.  Formerly known as PLT Scheme. The builtpkgs source."
arch=('x86_64')
url="https://racket-lang.org/"
license=('Apache' 'GPL3' 'LGPL3' 'custom')
depends=('gtk3')
makedepends=('gsfonts' 'sqlite')
options=('!strip' '!emptydirs')
#
# 8.0 is out with Racket-CS as the default implementation.
# The source + built packages distribution is recommended, as stated on the
# Racket download page:
# "
#  The Source + built packages distribution includes pre-built,
#  platform-independent bytecode; it installs much faster than
#  plain source, and it is also compatible with fast installs of
#  additional Racket packages.
# "
#
source=("https://download.racket-lang.org/releases/${pkgver}/installers/${pkgname}-${pkgver}-src-builtpkgs.tgz")
sha1sums=('9a713b45bc82f5dc1f617c5957581505e2a2aafd')

prepare() {
    cd "$pkgbase-$pkgver"
    echo "Icon=drracket" >>share/pkgs/drracket/drracket/drracket.desktop

}

build() {
    cd "$pkgbase-$pkgver/src"
    mkdir build && cd build
    [ "$CARCH" == "x86_64" ] && export CFLAGS+=" -fPIC"
    ../configure --prefix=/usr --sysconfdir=/etc --enable-shared
    make
}

package() {
    cd "$pkgbase-$pkgver/src/build"
    make DESTDIR="$pkgdir" install
    install -Dm644 -t "$pkgdir/usr/share/licenses/$pkgname/" LICENSE*.txt
    install -Dm644 ../share/pkgs/drracket/drracket/drracket.desktop "$pkgdir/usr/share/applications/drracket.desktop"
    install -d "$pkgdir"/usr/share/icons/hicolor/scalable/apps
    ln -s /usr/share/racket/pkgs/icons/racket-logo.svg "$pkgdir/usr/share/icons/hicolor/scalable/apps/drracket.svg"
}

And the error is:

raco setup: --- post-installing collections ---                    [16:45:55]
raco setup: --- checking package dependencies ---                  [16:45:55]
raco setup: found undeclared dependency:
raco setup:   mode: run
raco setup:   for package: "chk-test"
raco setup:   on package: core
raco setup:   dependent source: /home/bigdaddy/.racket/8.0/pkgs/chk-test/chk/compiled/test-args_rkt.zo
raco setup:   used module: (lib "racket/base.rkt")
raco setup: found undeclared dependency:
raco setup:   mode: run
raco setup:   for package: "chk-test"
raco setup:   on package: core
raco setup:   dependent source: /home/bigdaddy/.racket/8.0/pkgs/chk-test/chk/compiled/test-args_rkt.zo
raco setup:   used module: (lib "syntax/parse/define.rkt")
raco setup: found undeclared dependency:
raco setup:   mode: run
raco setup:   for package: "chk-test"
raco setup:   on package: core
raco setup:   dependent source: /home/bigdaddy/.racket/8.0/pkgs/chk-test/chk/compiled/test-args_rkt.zo
raco setup:   used module: (lib "racket/format.rkt")
raco setup: found undeclared dependency:
raco setup:   mode: run
raco setup:   for package: "chk-test"
raco setup:   on package: core
raco setup:   dependent source: /home/bigdaddy/.racket/8.0/pkgs/chk-test/chk/compiled/test-args_rkt.zo
raco setup:   used module: (lib "syntax/location.rkt")
raco setup: found undeclared dependency:
raco setup:   mode: run
raco setup:   for package: "chk-test"
raco setup:   on package: core
raco setup:   dependent source: /home/bigdaddy/.racket/8.0/pkgs/chk-test/chk/compiled/test-args_rkt.zo
raco setup:   used module: (lib "racket/runtime-config.rkt")
raco setup: found undeclared dependency:
raco setup:   mode: run
raco setup:   for package: "chk-test"
raco setup:   on package: core
raco setup:   dependent source: /home/bigdaddy/.racket/8.0/pkgs/chk-test/chk/compiled/test_rkt.zo
raco setup:   used module: (lib "racket/base.rkt")
raco setup: found undeclared dependency:
raco setup:   mode: run
raco setup:   for package: "chk-test"
raco setup:   on package: core
raco setup:   dependent source: /home/bigdaddy/.racket/8.0/pkgs/chk-test/chk/compiled/test_rkt.zo
raco setup:   used module: (lib "racket/runtime-config.rkt")
raco setup: --- summary of package problems ---                    [16:46:02]
raco setup: undeclared dependency detected
raco setup:   for package: "chk-test"
raco setup:   on package:
raco setup:    "base"
make[3]: *** [Makefile:467: setup-install] Error 1
make[3]: Leaving directory '/home/bigdaddy/Projects/Repos/AUR/racket-builtpkgs/src/racket-8.0/src/build/cs/c'
make[2]: *** [Makefile:241: install-cs-common] Error 2
make[2]: Leaving directory '/home/bigdaddy/Projects/Repos/AUR/racket-builtpkgs/src/racket-8.0/src/build'
make[1]: *** [Makefile:245: install-racketcs] Error 2
make[1]: Leaving directory '/home/bigdaddy/Projects/Repos/AUR/racket-builtpkgs/src/racket-8.0/src/build'
make: *** [Makefile:111: install] Error 2
==> ERROR: A failure occurred in package().
    Aborting...

This does not happen if I just build from source myself.

Last edited by AlecStewart1 (2021-04-01 22:09:26)

Offline

#7 2021-04-01 22:36:42

loqs
Member
Registered: 2014-03-06
Posts: 13,184

Re: PKGBUILD Review Request: Update Racket to Version 8.0, & Gambit-C

That line worked for me in a clean chroot but the following install lines failed as the working directory was different so I changed the start of package() to the following:

package() {
    cd "$pkgbase-$pkgver/src"
    make -C build DESTDIR="$pkgdir" install

That built successfully.

Offline

#8 2021-04-02 02:50:24

AlecStewart1
Member
Registered: 2021-03-31
Posts: 8

Re: PKGBUILD Review Request: Update Racket to Version 8.0, & Gambit-C

Yea I'm still getting this error:

raco setup: undeclared dependency detected
raco setup:   for package: "chk-test"
raco setup:   on package:
raco setup:    "base"
make[3]: *** [Makefile:467: setup-install] Error 1
make[3]: Leaving directory '/home/bigdaddy/Projects/Repos/AUR/racket-builtpkgs/src/racket-8.0/src/build/cs/c'
make[2]: *** [Makefile:241: install-cs-common] Error 2
make[2]: Leaving directory '/home/bigdaddy/Projects/Repos/AUR/racket-builtpkgs/src/racket-8.0/src/build'
make[1]: *** [Makefile:245: install-racketcs] Error 2
make[1]: Leaving directory '/home/bigdaddy/Projects/Repos/AUR/racket-builtpkgs/src/racket-8.0/src/build'
make: *** [Makefile:111: install] Error 2
==> ERROR: A failure occurred in package().
    Aborting...

I have no idea how to go about this. Again, building the package myself works fine. It's doing it with a PKGBUILD and makepkg where it fails.

EDIT:

Yup, ran

sudo make install

myself in the proper directory and racket is properly installed on my system fine. Is there something I'm missing about makepkg or PKGBUILD that would be giving me this issue?

Again, here's the PKGBUILD file I have:

pkgname=racket
pkgver=8.0
pkgrel=0
pkgdesc="A full-spectrum language with DrRacket IDE.  Formerly known as PLT Scheme. The builtpkgs source."
arch=('x86_64')
url="https://racket-lang.org/"
license=('Apache' 'GPL3' 'LGPL3' 'custom')
depends=('gtk3')
makedepends=('gsfonts' 'sqlite')
options=('!strip' '!emptydirs')
source=("https://download.racket-lang.org/releases/${pkgver}/installers/${pkgname}-${pkgver}-src-builtpkgs.tgz")
sha1sums=('9a713b45bc82f5dc1f617c5957581505e2a2aafd')

prepare() {
    cd "$pkgbase-$pkgver"
    echo "Icon=drracket" >>share/pkgs/drracket/drracket/drracket.desktop
}

build() {
    cd "$pkgbase-$pkgver/src"
    mkdir build && cd build
    [ "$CARCH" == "x86_64" ] && export CFLAGS+=" -fPIC"
    ../configure --prefix=/usr --sysconfdir=/etc --enable-shared
    make
}

package() {
    cd "$pkgbase-$pkgver/src/build"
    make -C . install DESTDIR="$pkgdir" # <- it's fucking up here
    install -Dm644 -t "$pkgdir/usr/share/licenses/$pkgname/" LICENSE*.txt
    install -Dm644 ../share/pkgs/drracket/drracket/drracket.desktop "$pkgdir/usr/share/applications/drracket.desktop"
    install -d "$pkgdir"/usr/share/icons/hicolor/scalable/apps
    ln -s /usr/share/racket/pkgs/icons/racket-logo.svg "$pkgdir/usr/share/icons/hicolor/scalable/apps/drracket.svg"
}

I would like to note that I'm never prompted for a password when I run the above PKGBUILD with

makepkg -si

Last edited by AlecStewart1 (2021-04-02 04:30:01)

Offline

#9 2021-04-02 15:07:10

loqs
Member
Registered: 2014-03-06
Posts: 13,184

Re: PKGBUILD Review Request: Update Racket to Version 8.0, & Gambit-C

Please try building it in a clean chroot and see if the make install line then works for you.  The install lines following should then fail for the reason covered in #7.

Offline

#10 2021-04-03 03:46:24

AlecStewart1
Member
Registered: 2021-03-31
Posts: 8

Re: PKGBUILD Review Request: Update Racket to Version 8.0, & Gambit-C

Yup! That works.

Had to figure out how to do a clean chroot on Artix Linux, as that's what I use.

This works fine for me for the regular racket package:

pkgname=racket
pkgver=8.0
pkgrel=0
pkgdesc="A full-spectrum language with DrRacket IDE.  Formerly known as PLT Scheme."
arch=('x86_64')
url="https://racket-lang.org/"
license=('Apache' 'MIT' 'GPL3' 'LGPL3' 'custom')
depends=('gtk3')
makedepends=('gsfonts' 'sqlite')
options=('!strip' '!emptydirs')
source=("https://download.racket-lang.org/releases/${pkgver}/installers/${pkgname}-${pkgver}-src-builtpkgs.tgz")
sha1sums=('9a713b45bc82f5dc1f617c5957581505e2a2aafd')

prepare() {
    cd "$pkgbase-$pkgver"
    echo "Icon=drracket" >>share/pkgs/drracket/drracket/drracket.desktop
}

build() {
    cd "$pkgbase-$pkgver/src"
    mkdir build && cd build
    [ "$CARCH" == "x86_64" ] && export CFLAGS+=" -fPIC"
    ../configure --prefix=/usr --sysconfdir=/etc --enable-shared
    make
}

package() {
    cd "$pkgbase-$pkgver/src/build"
    make install DESTDIR="$pkgdir"
    install -Dm644 -t "$pkgdir/usr/share/licenses/$pkgname/" ../LICENSE-*.txt
    install -Dm644 ../../share/pkgs/drracket/drracket/drracket.desktop "$pkgdir/usr/share/applications/drracket.desktop"
    install -d "$pkgdir"/usr/share/icons/hicolor/scalable/apps
    ln -s ../../share/racket/pkgs/icons/racket-logo.svg "$pkgdir/usr/share/icons/hicolor/scalable/apps/drracket.svg"
}

And the racket-minimal package:

pkgname=racket-minimal
pkgver=8.0
pkgrel=0
pkgdesc="A full-spectrum language with DrRacket IDE.  Formerly known as PLT Scheme. Minimal build without DrRacket."
arch=('x86_64')
url="https://racket-lang.org/"
license=('Apache' 'MIT' 'GPL3' 'LGPL3' 'custom')
depends=('gtk3')
makedepends=('gsfonts' 'sqlite')
options=('!strip' '!emptydirs')
source=("https://download.racket-lang.org/releases/${pkgver}/installers/${pkgname}-${pkgver}-src-builtpkgs.tgz")
sha1sums=('b1e1e8b9755f42f19923d3e13a12ff35e5c11035')

prepare() {
    cd "racket-$pkgver"
}

build() {
    cd "racket-$pkgver/src"
    mkdir build && cd build
    [ "$CARCH" == "x86_64" ] && export CFLAGS+=" -fPIC"
    ../configure --prefix=/usr --sysconfdir=/etc --enable-shared
    make
}

package() {
    cd "racket-$pkgver/src/build"
    make install DESTDIR="$pkgdir"
    install -Dm644 -t "$pkgdir/usr/share/licenses/$pkgname/" ../LICENSE-*.txt
    install -d "$pkgdir"/usr/share/icons/hicolor/scalable/apps
}

Now...how does one propose to push these to the community repo? This could just be my perspective, but I think both would be useful to use. The Racket package would be up to date, there could be a separate more clear PKGBUILD for the racket-minimal package, the "source + built packages" is what's recommended, the Gambit-C package would allow building Gerbil Scheme much easier and allow for people to work with Gambit easier (as a couple of those configure flags allow for debugging and autodoc). Again, that's just my opinion. I could be totally wrong. I would understand if this is not ideal for most users, although I would like to know why exactly.

Last edited by AlecStewart1 (2021-04-03 04:07:44)

Offline

#11 2021-04-03 20:08:12

loqs
Member
Registered: 2014-03-06
Posts: 13,184

Re: PKGBUILD Review Request: Update Racket to Version 8.0, & Gambit-C

AlecStewart1 wrote:

Now...how does one propose to push these to the community repo?

There is no official process.  If you are the one flagging the package out of date you could link to your updated PKGBUILD.  Otherwise you can email the maintainer your PKGBUILD or create a post such as this.

AlecStewart1 wrote:

the "source + built packages" is what's recommended,

You did not respond to my question on the recommendation in post #4

AlecStewart1 wrote:

the Gambit-C package would allow building Gerbil Scheme much easier and allow for people to work with Gambit easier (as a couple of those configure flags allow for debugging and autodoc).

Do the debug flags enable debug symbols or something else?

Edit:

    make -j
    make bootstrap
    make bootclean
    make check

make -j,  jobs issue.  make check should be in the check function()
make bootstrap removes everything generated by the previous make and what is actually packaged is generated by make check?

Last edited by loqs (2021-04-03 20:33:12)

Offline

#12 2021-04-03 21:32:56

AlecStewart1
Member
Registered: 2021-03-31
Posts: 8

Re: PKGBUILD Review Request: Update Racket to Version 8.0, & Gambit-C

Ioqs wrote:

If you are the one flagging the package out of date you could link to your updated PKGBUILD.

Ah.

Ioqs wrote:

Otherwise you can email the maintainer your PKGBUILD or create a post such as this.

I couldn't seem to find the information to contact the maintainer for Racket, so that's why I made this post.

Ioq wrote:

You did not respond to my question on the recommendation in post #4

Ah, my mistake. If you go the the downloads page for Racket (https://download.racket-lang.org/) and select "Unix source" in the dropdown there.

Iops wrote:

Do the debug flags enable debug symbols or something else?

In the configure file for Gambit it says

--enable-debug         
                          build system so that it can be debugged (default is NO)

--enable-rtlib-debug-source
                          Include the source code debugging information in the
                          code generated for the Scheme runtime library
                          (default is NO)

And if you are using say the Emacs package Geiser, for working with Gambit it states

2. Configure Gambit using --enable-rtlib-debug-source to activate autodoc

And for build Gerbil, at least for development, it states for building Gambit

I usually configure Gambit for development with the following incantation:

./configure --prefix=/usr/local/gambit \
            --enable-single-host \
            --enable-multiple-versions \
            --enable-shared \
            --enable-openssl \
            --enable-default-runtime-options=f8,-8,t8 \
            --enable-poll # For Linux and BSD; don't use this on macOS

Some flags may actually be unnecessary.

Offline

#13 2021-04-03 22:19:00

loqs
Member
Registered: 2014-03-06
Posts: 13,184

Re: PKGBUILD Review Request: Update Racket to Version 8.0, & Gambit-C

AlecStewart1 wrote:

I couldn't seem to find the information to contact the maintainer for Racket, so that's why I made this post.

From the top of the racket PKGBUILD

# Maintainer: Kyle Keen <keenerd@gmail.com>

Without --enable-debug

gcc -O1 -march=x86-64 -mtune=generic -O2 -pipe -fno-plt   -Wno-unused -Wno-write-strings -Wdisabled-optimization -fwrapv -fno-strict-aliasing -fno-trapping-math -fno-math-errno -fschedule-insns2 -fmodulo-sched -freschedule-modulo-scheduled-loops -fomit-frame-pointer -fPIC -fno-common -mpc64

With --enable-debug

gcc  -march=x86-64 -mtune=generic -O2 -pipe -fno-plt   -Wno-unused -Wno-write-strings -Wdisabled-optimization -g -ftrapv -fno-strict-aliasing -fno-trapping-math -fno-math-errno -fschedule-insns2 -fmodulo-sched -freschedule-modulo-scheduled-loops -fPIC -fno-common -mpc64

It is adding -g.  The option may do other things as well that I have no idea about but that is what I was wondering about.
Arch in general does not build with debug symbols.  There is a plan to enable debug packaging at some future point https://lists.archlinux.org/pipermail/a … 30222.html
You would also need to add !strip to the PKGBUILD options otherwise makepkg will remove the debug info.

Last edited by loqs (2021-04-03 22:24:40)

Offline

#14 2021-04-04 18:15:11

AlecStewart1
Member
Registered: 2021-03-31
Posts: 8

Re: PKGBUILD Review Request: Update Racket to Version 8.0, & Gambit-C

Ah, I see. So for the sake of it, I'll post the PKGBUILDs I have for each here that worked for me. That way I can send a link to the maintainers in an email to them so they know that this is legit, and so they can criticize my PKGBUILD, lol.

Racket (using the source + builtpkgs)

pkgname=racket
pkgver=8.0
pkgrel=0
pkgdesc="A full-spectrum language with DrRacket IDE.  Formerly known as PLT Scheme. The builtpkgs source."
arch=('x86_64')
url="https://racket-lang.org/"
license=('Apache' 'MIT' 'GPL3' 'LGPL3' 'custom')
depends=('gtk3')
makedepends=('gsfonts' 'sqlite')
options=('!strip' '!emptydirs')
source=("https://download.racket-lang.org/releases/${pkgver}/installers/${pkgname}-${pkgver}-src-builtpkgs.tgz")
sha1sums=('9a713b45bc82f5dc1f617c5957581505e2a2aafd')

prepare() {
    cd "$pkgbase-$pkgver"
    echo "Icon=drracket" >>share/pkgs/drracket/drracket/drracket.desktop
}

build() {
    cd "$pkgbase-$pkgver/src"
    mkdir build && cd build
    [ "$CARCH" == "x86_64" ] && export CFLAGS+=" -fPIC"
    ../configure --prefix=/usr --sysconfdir=/etc --enable-shared
    make
}

package() {
    cd "$pkgbase-$pkgver/src/build"
    make install DESTDIR="$pkgdir"
    install -Dm644 -t "$pkgdir/usr/share/licenses/$pkgname/" ../LICENSE-*.txt
    install -Dm644 ../../share/pkgs/drracket/drracket/drracket.desktop "$pkgdir/usr/share/applications/drracket.desktop"
    install -d "$pkgdir"/usr/share/icons/hicolor/scalable/apps
    ln -s ../../share/racket/pkgs/icons/racket-logo.svg "$pkgdir/usr/share/icons/hicolor/scalable/apps/drracket.svg"
}

Racket Minimal (also with source + builtpkgs)

pkgname=racket-minimal
pkgver=8.0
pkgrel=0
pkgdesc="A full-spectrum language with DrRacket IDE.  Formerly known as PLT Scheme. Minimal build without DrRacket."
arch=('x86_64')
url="https://racket-lang.org/"
license=('Apache' 'MIT' 'GPL3' 'LGPL3' 'custom')
depends=('gtk3')
makedepends=('gsfonts' 'sqlite')
options=('!strip' '!emptydirs')
source=("https://download.racket-lang.org/releases/${pkgver}/installers/${pkgname}-${pkgver}-src-builtpkgs.tgz")
sha1sums=('b1e1e8b9755f42f19923d3e13a12ff35e5c11035')

prepare() {
    cd "racket-$pkgver"
}

build() {
    cd "racket-$pkgver/src"
    mkdir build && cd build
    [ "$CARCH" == "x86_64" ] && export CFLAGS+=" -fPIC"
    ../configure --prefix=/usr --sysconfdir=/etc --enable-shared
    make
}

package() {
    cd "racket-$pkgver/src/build"
    make install DESTDIR="$pkgdir"
    install -Dm644 -t "$pkgdir/usr/share/licenses/$pkgname/" ../LICENSE-*.txt
    install -d "$pkgdir"/usr/share/icons/hicolor/scalable/apps
}

Gambit Scheme

pkgname=gambit-c
pkgver=4.9.3
pkgrel=2
pkgdesc='Efficient implementation of the Scheme programming language'
arch=(x86_64)
url='https://github.com/gambit/gambit'
license=(LGPL Apache)
options=(staticlibs)
makedepends=(git)
options=('!strip' '!emptydirs')
source=("$pkgname-$pkgver.tgz::https://www.iro.umontreal.ca/~${pkgname%-c}/download/${pkgname%-c}/v${pkgver%.*}/source/${pkgname/-c/-v}${pkgver//./_}-devel.tgz")
sha256sums=('4321ea0042f349eef673d2607a39c24f72e223aaf63f60298fffb7365f60fe53')

build() {
    cd "${pkgname/-c/-v}${pkgver//./_}-devel"
    # To allow for autodoc for the interactive repl
    ./configure \
        --prefix=/usr \
        --docdir=/usr/share/doc/gambit-c \
        --infodir=/usr/share/info \
        --libdir=/usr/lib/gambit-c \
        --enable-gcc-opts \
        --enable-single-host \
        --enable-openssl \
        --enable-default-runtime-options=f8,-8,t8 \
        --enable-poll \
        --enable-debug \
        --enable-rtlib-debug-source
    make bootstrap
    make bootclean
}

# Would enable this, but it doesn't always pass all of the tests
# Particularly Test #9
#
#check() {
#    cd "${pkgname/-c/-v}${pkgver//./_}-devel"
#    make check
#}

package() {
    cd "${pkgname/-c/-v}${pkgver//./_}-devel"
    make install DESTDIR="$pkgdir"

    #mkdir "$pkgdir/usr/bin"
    #cp -rp "$pkgdir/usr/v$pkgver/bin/*" "$pkgdir/usr/bin"
    # /usr/bin/gsc conflicts with ghostscript
    mv "$pkgdir/usr/bin/gsc" "$pkgdir/usr/bin/gambitc"
    ln -sf /usr/bin/gambitc "$pkgdir/usr/bin/gsc-script"
}

# getver: github.com/gambit/gambit/releases/latest
# vim: ts=2 sw=2 et:

Hopefully this is useful.

Offline

Board footer

Powered by FluxBB