Skip to content

Commit

Permalink
Update GNUStep dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
madsmtm committed Jan 11, 2025
1 parent a1d256e commit 7d3ea92
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 29 deletions.
22 changes: 11 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -690,7 +690,7 @@ jobs:
~/extern/lib
~/extern/include
# Change this key if we start caching more things
key: extern-${{ github.job }}-${{ matrix.name }}-v2
key: extern-${{ github.job }}-${{ matrix.name }}-v3

- name: Setup environment
# These add to PATH-like variables, so they can always be set
Expand Down Expand Up @@ -761,29 +761,29 @@ jobs:
- name: Install GNUStep make
if: steps.extern-cache.outputs.cache-hit != 'true'
run: |
wget https://github.com/gnustep/tools-make/archive/refs/tags/make-2_9_0.tar.gz
tar -xzf make-2_9_0.tar.gz
mkdir -p tools-make-make-2_9_0/build
cd tools-make-make-2_9_0/build
wget https://github.com/gnustep/tools-make/archive/refs/tags/make-2_9_2.tar.gz
tar -xzf make-2_9_2.tar.gz
mkdir -p tools-make-make-2_9_2/build
cd tools-make-make-2_9_2/build
../configure --prefix=$HOME/extern --with-library-combo=ng-gnu-gnu
make install
- name: Install GNUStep base library
if: steps.extern-cache.outputs.cache-hit != 'true'
run: |
wget https://github.com/gnustep/libs-base/archive/refs/tags/base-1_28_0.tar.gz
tar -xzf base-1_28_0.tar.gz
cd libs-base-base-1_28_0
wget https://github.com/gnustep/libs-base/archive/refs/tags/base-1_30_0.tar.gz
tar -xzf base-1_30_0.tar.gz
cd libs-base-base-1_30_0
./configure --prefix=$HOME/extern --disable-tls --disable-xslt ${{ matrix.configureflags }}
make install
ls -al $HOME/extern/*
- name: Install GNUStep GUI
if: matrix.target == 'x86_64-unknown-linux-gnu' && steps.extern-cache.outputs.cache-hit != 'true'
run: |
wget https://github.com/gnustep/libs-gui/archive/refs/tags/gui-0_29_0.tar.gz
tar -xzf gui-0_29_0.tar.gz
cd libs-gui-gui-0_29_0
wget https://github.com/gnustep/libs-gui/archive/refs/tags/gui-0_31_1.tar.gz
tar -xzf gui-0_31_1.tar.gz
cd libs-gui-gui-0_31_1
./configure --prefix=$HOME/extern --disable-jpeg ${{ matrix.configureflags }}
make install
ls -al $HOME/extern/*
Expand Down
14 changes: 1 addition & 13 deletions framework-crates/objc2-foundation/src/data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,19 +41,7 @@ impl NSData {
#[cfg(feature = "block2")]
#[cfg(feature = "alloc")]
pub fn from_vec(bytes: Vec<u8>) -> Retained<Self> {
// GNUStep's NSData `initWithBytesNoCopy:length:deallocator:` has a
// bug; it forgets to assign the input buffer and length to the
// instance before it swizzles to NSDataWithDeallocatorBlock.
// See https://github.com/gnustep/libs-base/pull/213
// So instead we use NSDataWithDeallocatorBlock directly.
//
// NSMutableData does not have this problem.
#[cfg(feature = "gnustep-1-7")]
let obj = unsafe { objc2::msg_send_id![objc2::class!(NSDataWithDeallocatorBlock), alloc] };
#[cfg(not(feature = "gnustep-1-7"))]
let obj = Self::alloc();

unsafe { with_vec(obj, bytes) }
unsafe { with_vec(Self::alloc(), bytes) }
}
}

Expand Down
5 changes: 0 additions & 5 deletions framework-crates/objc2-foundation/src/value.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,6 @@ impl NSValue {
impl NSValue {
/// Retrieve the data contained in the `NSValue`.
///
/// Note that this is broken on GNUStep for some types, see
/// [gnustep/libs-base#216].
///
/// [gnustep/libs-base#216]: https://github.com/gnustep/libs-base/pull/216
///
///
/// # Safety
///
Expand Down

0 comments on commit 7d3ea92

Please sign in to comment.