# HG changeset patch # User David Demelier # Date 1567424420 -7200 # Node ID da9d739541b62702fd442c6e01900f7f03382758 # Parent 738844ea7821346670e07070106b49a420f8b561 gnu/parted: initial import, closes #2261 diff -r 738844ea7821 -r da9d739541b6 gnu/parted/parted.sh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gnu/parted/parted.sh Mon Sep 02 13:40:20 2019 +0200 @@ -0,0 +1,65 @@ +#!/bin/busybox sh +# +# Copyright (c) 2019 David Demelier +# +# Permission to use, copy, modify, and/or distribute this software for any +# purpose with or without fee is hereby granted, provided that the above +# copyright notice and this permission notice appear in all copies. +# +# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +# + +PKGNAME=parted +PKGVERSION=3.2 +PKGREVISION=1 +PKGLICENSE="GPLv30" +PKGSUMMARY="GNU program for manipulating partition tables" +PKGDOWNLOAD="https://ftp.gnu.org/gnu/$PKGNAME/$PKGNAME-$PKGVERSION.tar.xz" +PKGDEPENDS="lvm2 util-linux" +PKGOPTIONS="NLS" + +: ${CHOST:=$(uname -m)-linux-musl} +: ${CBUILD:=$(uname -m)-linux-musl} +: ${CC:=clang} +: ${CFLAGS:=-O2} +: ${LDFLAGS:=} +: ${LIBS:=} +: ${NLS:=yes} + +if [ "$NLS" = "yes" ]; then + PKGDEPENDS="gettext $PKGDEPENDS" + with_nls="--enable-nls" +else + with_nls="--disable-nls" +fi + +build() +{ + rm -rf $PKGNAME-$PKGVERSION + tar xvf $PKGNAME-$PKGVERSION.tar.xz + cd $PKGNAME-$PKGVERSION + + patch -p0 < ../patch-musl.patch + CC="$CC" \ + CFLAGS="$CFLAGS" \ + LDFLAGS="$LDFLAGS" \ + LIBS="$LIBS" \ + ./configure \ + --build=$CBUILD \ + --host=$CHOST \ + --prefix= \ + --sbindir=/bin \ + $with_nls + make + make install DESTDIR=$DESTDIR + find $DESTDIR -type f -name "*.la" -delete + + cd .. + rm -rf $PKGNAME-$PKGVERSION +} diff -r 738844ea7821 -r da9d739541b6 gnu/parted/parted.sha1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gnu/parted/parted.sha1 Mon Sep 02 13:40:20 2019 +0200 @@ -0,0 +1,1 @@ +78db6ca8dd6082c5367c8446bf6f7ae044091959 parted-3.2.tar.xz diff -r 738844ea7821 -r da9d739541b6 gnu/parted/patch-musl.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gnu/parted/patch-musl.patch Mon Sep 02 13:40:20 2019 +0200 @@ -0,0 +1,10 @@ +--- libparted/fs/xfs/platform_defs.h.orig 2019-09-02 13:09:02.071047993 +0200 ++++ libparted/fs/xfs/platform_defs.h 2019-09-02 13:09:33.703048965 +0200 +@@ -34,6 +34,7 @@ + #ifndef __XFS_PLATFORM_DEFS_H__ + #define __XFS_PLATFORM_DEFS_H__ + ++#include + #include + #include + #include