Skip to content

Conversation

@GZGavinZhao
Copy link
Member

Summary

Update Racket to 8.18.

Changelogs:

Test Plan

Re-ran all homework for my university's programming language course that's taught in Racket.

Checklist

  • Package was built and tested against unstable
  • This change could gainfully be listed in the weekly sync notes once merged

# upstream recommends against building shared libraries (--enable-shared)
mkdir -p src/build
pushd src/build
../%configure_no_runstatedir \
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Racket for some reason accepts neither --sbindir nor --runstatedir.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This appears to be a regression in Racket; Fedora raised a similar issue for the sbindir, and carry patches for it until the next release. I think we should open an issue on their tracker, referencing the sbindir issue.

I downloaded the two patches carried by Fedora, and used the following package.yml:

name       : racket
version    : '8.18'
release    : 22
source     :
    - https://download.racket-lang.org/installers/8.18/racket-8.18-src.tgz : 65477c71ec1a978a6ee4db582b9b47b1a488029d7a42e358906de154a6e5905c
homepage   : https://racket-lang.org/
license    :
    - Apache-2.0
    - LGPL-3.0-only
    - MIT
component  : programming
libsplit   : no
strip      : no  # mred and mzscheme will break if they're stripped
summary    : Racket is a full-spectrum Lisp/Scheme-family programming language.
description: |
    Racket is a full-spectrum programming language. It goes beyond Lisp and Scheme with dialects that support objects, types, laziness, and more.
builddeps  :
    - pkgconfig(gtk+-3.0)
    - pkgconfig(liblz4)
    - pkgconfig(libturbojpeg)
    - pkgconfig(sqlite3)
    - urw-core35-fonts
setup      : |
    %patch -p2 -i $pkgfiles/2b503b4d46c17be4087d30e7eb3135508f489d0f.patch
    %patch -p2 -i $pkgfiles/926bc4da215a92c8313779f228c39be69638d0ee.patch

    pushd src

    # upstream recommends against building shared libraries (--enable-shared)
    %configure \
        --enable-libz \
        --enable-liblz4
    popd
build      : |
    pushd src
    # ensure that the racket build system uses all available CPU threads
    %make CPUS=%YJOBS%
    popd
install    : |
    pushd src
    %make_install
    install -Dm00644 ../../share/drracket-exe-icon.png $installdir/usr/share/icons/hicolor/96x96/apps/org.racket_lang.Racket.png
    install -Dm00644 ../../share/pkgs/icons/racket-logo.svg $installdir/usr/share/icons/hicolor/scalable/apps/org.racket_lang.Racket.png
    mv $installdir/usr/share/applications/{drracket.desktop,org.racket_lang.Racket.desktop}
    install -Dm00644 $pkgfiles/org.racket_lang.Racket.desktop -t  $installdir/usr/share/applications/
    install -Dm00644 $pkgfiles/org.racket_lang.Racket.appdata.xml -t  $installdir/usr/share/metainfo/
    # Remove empty directories
    find $installdir -type d -empty -delete
    popd
    # Remove static library
    rm $installdir/usr/lib64/libracketcs.a

In troubleshooting, I switched to the same source that Fedora is using; I'm not sure if that actually makes a difference, though.

Copy link
Member

@EbonJaeger EbonJaeger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In addition to the comment below, we have three patches in the files directory that haven't been used in 6 or 7 years. Let's remove them.

# upstream recommends against building shared libraries (--enable-shared)
mkdir -p src/build
pushd src/build
../%configure_no_runstatedir \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This appears to be a regression in Racket; Fedora raised a similar issue for the sbindir, and carry patches for it until the next release. I think we should open an issue on their tracker, referencing the sbindir issue.

I downloaded the two patches carried by Fedora, and used the following package.yml:

name       : racket
version    : '8.18'
release    : 22
source     :
    - https://download.racket-lang.org/installers/8.18/racket-8.18-src.tgz : 65477c71ec1a978a6ee4db582b9b47b1a488029d7a42e358906de154a6e5905c
homepage   : https://racket-lang.org/
license    :
    - Apache-2.0
    - LGPL-3.0-only
    - MIT
component  : programming
libsplit   : no
strip      : no  # mred and mzscheme will break if they're stripped
summary    : Racket is a full-spectrum Lisp/Scheme-family programming language.
description: |
    Racket is a full-spectrum programming language. It goes beyond Lisp and Scheme with dialects that support objects, types, laziness, and more.
builddeps  :
    - pkgconfig(gtk+-3.0)
    - pkgconfig(liblz4)
    - pkgconfig(libturbojpeg)
    - pkgconfig(sqlite3)
    - urw-core35-fonts
setup      : |
    %patch -p2 -i $pkgfiles/2b503b4d46c17be4087d30e7eb3135508f489d0f.patch
    %patch -p2 -i $pkgfiles/926bc4da215a92c8313779f228c39be69638d0ee.patch

    pushd src

    # upstream recommends against building shared libraries (--enable-shared)
    %configure \
        --enable-libz \
        --enable-liblz4
    popd
build      : |
    pushd src
    # ensure that the racket build system uses all available CPU threads
    %make CPUS=%YJOBS%
    popd
install    : |
    pushd src
    %make_install
    install -Dm00644 ../../share/drracket-exe-icon.png $installdir/usr/share/icons/hicolor/96x96/apps/org.racket_lang.Racket.png
    install -Dm00644 ../../share/pkgs/icons/racket-logo.svg $installdir/usr/share/icons/hicolor/scalable/apps/org.racket_lang.Racket.png
    mv $installdir/usr/share/applications/{drracket.desktop,org.racket_lang.Racket.desktop}
    install -Dm00644 $pkgfiles/org.racket_lang.Racket.desktop -t  $installdir/usr/share/applications/
    install -Dm00644 $pkgfiles/org.racket_lang.Racket.appdata.xml -t  $installdir/usr/share/metainfo/
    # Remove empty directories
    find $installdir -type d -empty -delete
    popd
    # Remove static library
    rm $installdir/usr/lib64/libracketcs.a

In troubleshooting, I switched to the same source that Fedora is using; I'm not sure if that actually makes a difference, though.

@GZGavinZhao
Copy link
Member Author

I managed to find the correct patch but getting some weird path errors, needs to investigate more.

@GZGavinZhao GZGavinZhao marked this pull request as draft September 15, 2025 16:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Triage

Development

Successfully merging this pull request may close these issues.

2 participants