51

Re: [Collection] Packages never getting into the repositories or not ready

Package focuswriter as it was removed. If someone wants to adapt that package for a port, please feel invited.

# Maintainer (Arch): Balló György <ballogyor+arch at gmail dot com>
# Contributor (Arch): Graeme Gott <graeme@gottcode.org>

pkgname=focuswriter
pkgver=1.7.6
pkgrel=1
pkgdesc='Simple, distraction-free word processor'
arch=('i686' 'x86_64')
url='https://gottcode.org/focuswriter/'
license=('GPL-3')
depends=('hicolor-icon-theme' 'hunspell' 'qt-multimedia')
makedepends=('qt-tools')
source=("https://gottcode.org/$pkgname/$pkgname-$pkgver-src.tar.bz2"{,.asc})
sha512sums=('45e0bc9b20c73b260aa42dcc9ee79515d3ad95d4c9586f60ab75fb404f73c7443484f238b3705ba3224b852a0d9b8b8db17d9145aebb77513f8597a01ab01d3b'
            'SKIP')
validpgpkeys=('57E4D43C10CD7EDB8360C84774FFC7F02C4F6B37')

prepare() {
  cd $pkgname-$pkgver
  sed -i '/INSTALLS +=/ s/ pixmap//' focuswriter.pro
}

build() {
  cd $pkgname-$pkgver
  qmake-qt5 PREFIX=/usr
  make
}

package() {
  cd $pkgname-$pkgver
  make INSTALL_ROOT="$pkgdir" install
  install -Dm644 COPYING -t "${pkgdir}/usr/share/licenses/$pkgname"
}
Human being in favor with clear principles and so also for freedom in soft- and hardware!

Certainly anyone who has the power to make you believe absurdities has the power to make you commit injustices: For a life of every being full with peace and kindness, including diversity and freedom. Capitalism is destroying our minds, the planet itself and the universe in the end!

52

Re: [Collection] Packages never getting into the repositories or not ready

Package ii.

PKGBUILD

# Maintainer: Tobias Dausend <throgh@hyperbola.info>

pkgname=ii
pkgver=2.0
pkgrel=1
pkgdesc="A minimalist FIFO and filesystem-based IRC client"
arch=('i686' 'x86_64')
url='https://tools.suckless.org/ii/'
license=('Expat')
source=("https://dl.suckless.org/tools/${pkgname}-${pkgver}.tar.gz")
sha512sums=('ab8102b5669495b7bc6a3311245f3eb49d2add1e387290e41deb51e121f4c7c98a09d117052c345d8b896149276a83790c0b78efe3ed19fc52bc00575bf8e44a')

build() {
  cd "$pkgname-$pkgver"
  make
}

package() {
  cd "$pkgname-$pkgver"
  make DESTDIR="$pkgdir" PREFIX="/usr" install
  install -Dm644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname"
}
Human being in favor with clear principles and so also for freedom in soft- and hardware!

Certainly anyone who has the power to make you believe absurdities has the power to make you commit injustices: For a life of every being full with peace and kindness, including diversity and freedom. Capitalism is destroying our minds, the planet itself and the universe in the end!

53

Re: [Collection] Packages never getting into the repositories or not ready

Package solarus.

PKGBUILD

# Maintainer (Arch): MCMic <come@chilliet.eu>
# Contributor (Arch): MCMic <come@chilliet.eu>
# Contributor (Arch): Sam101 <zoetrem @t gmail dot com>
# Contributor (Arch): BenObiWan <benobiwan @t gmail dot com>
# Contributor (Arch): Huulivoide
# Contributor (Arch): Fernando Carmona Varo <ferkiwi @t gmail dot com>
# Contributor (Arch): Franck Stauffer <franck.stauffer@monaco.mc>
# Maintainer: Tobias Dausend <throgh@hyperbola.info>

pkgname=solarus
pkgver=1.6.5
pkgrel=1
pkgdesc="A lightweight, free and libre game engine for Action-RPGs"
arch=('i686' 'x86_64')
url='https://www.solarus-games.org/'
license=('GPL-3' 'CC-BY-SA-3.0' 'CC-BY-SA-4.0')
depends=('glm' 'hicolor-icon-theme' 'libmodplug' 'libvorbis'
         'luajit' 'openal' 'physfs' 'qt-base'
         'qt-tools' 'sdl2' 'sdl2_image' 'sdl2_ttf')
makedepends=('cmake')
groups=('games')
source=("https://gitlab.com/solarus-games/${pkgname}/-/archive/v${pkgver}/${pkgname}-v${pkgver}.tar.gz")
sha512sums=('3fc7473f1b7dd80cbcb0a7a639701f8b12bd40ee918a7853805bd54f877e752b4c31c26828e62248ca4594b3aed41a8c61a16be3b14b293f08d9ba938a723e91')

prepare() {
  cmake \
    -Wno-dev \
    -B build \
    -S "$pkgname-v$pkgver" \
    -DSOLARUS_TESTS=OFF \
    -DCMAKE_INSTALL_PREFIX="/usr" \
    -DCMAKE_INSTALL_BINDIR="games" \
    -DCMAKE_INSTALL_DATADIR="share/games" \
    -DCMAKE_BUILD_TYPE=Release
}

build() {
  make -C build ${MAKEFLAGS}
}

package() {
  make -C build DESTDIR="${pkgdir}/" install
  mv "${pkgdir}/usr/share/games/"{icons,pixmaps,applications,metainfo} "${pkgdir}/usr/share/"
  install -Dm644 "${srcdir}/$pkgname-v$pkgver/"license{,_gpl}.txt -t "${pkgdir}/usr/share/licenses/$pkgname"
}
Human being in favor with clear principles and so also for freedom in soft- and hardware!

Certainly anyone who has the power to make you believe absurdities has the power to make you commit injustices: For a life of every being full with peace and kindness, including diversity and freedom. Capitalism is destroying our minds, the planet itself and the universe in the end!

54 (edited by zapper 2023-06-01 00:45:19)

Re: [Collection] Packages never getting into the repositories or not ready

@throgh used to care about focuswriter, I think now, I would prefer novelwriter.

I don't know how you would add that given the rules you mentioned that govern Hyperbola.

Its possible its a no go for now. Which is a shame, its the best one I am found yet.

sad

Anywho, point being, focuswriter isn't as relevant to me now. big_smile


This being said, its wise if people save pkgbuild's if they need them badly enough and/or if they think they will still work after the "purge"

wink

HyperbolaBSD: The Future of Secure Libre Lightweight Operating Systems!

55

Re: [Collection] Packages never getting into the repositories or not ready

All is saved within the git-repositories, so it is also possible to jump back towards a previous version. smile

Human being in favor with clear principles and so also for freedom in soft- and hardware!

Certainly anyone who has the power to make you believe absurdities has the power to make you commit injustices: For a life of every being full with peace and kindness, including diversity and freedom. Capitalism is destroying our minds, the planet itself and the universe in the end!

56

Re: [Collection] Packages never getting into the repositories or not ready

Here's a GNU Units PKGBUILD which I tried to adapt to Hyperbola GNU+LinuxLibre packaging standards; This is my first time dealing with PKGBUILDs so it may have some quirks, though it works fine on my system

BTW, does anyone know the licensing status of these AUR and Hyperbola PKGBUILD scripts? I haven't found any information regarding the matter; are they, like, de facto public domain or something?

# Maintainer (Arch): tarball <bootctl@gmail.com>
# Contributor (Arch): Kyle Keen <keenerd@gmail.com>
# Contributor (Arch): Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor (Arch): Jeff Mickey <jeff@archlinux.org>
# Contributor (Arch): Steve Sansom <snsansom@gmail.com>
# Contributor: Ramon <Mamao@danwin1210.de>

pkgname=units
pkgver=2.21
_debver=2.21
_debrel=1
pkgrel=1
pkgdesc="Advanced software for the conversion of units (currencies, meters to feet etc.)"
arch=(i686 x86_64)
license=('GPL-3')
url="https://www.gnu.org/software/units/units.html"
optdepends=('python-unidecode: for live currency rates'
            'python-requests: for live currency rates')
makedepends=('quilt')
source=("https://ftpmirror.gnu.org/gnu/units/$pkgname-$pkgver.tar.gz"{,.sig}
        "https://deb.debian.org/debian/pool/main/u/units/units_$_debver-$_debrel.debian.tar.xz")
options=('!makeflags')
validpgpkeys=('9AD8FC4162D7937CF64F972E1889D5F0E0636F49') # Adrian Mariano <adrian@cam.cornell.edu> and <adrianm@gnu.org>
sha512sums=('34bacff606f12aa5b2e59170f6b2142277aa1121d79610a51b57f07f17ae2dbdfbbb0e60be34522f367679cc152408f77c1ebb551016224d23f81c21f4b3ba62'
            'SKIP'
            'f7f081ab2140b3cb5b8abed8d4061334bedc89077371f760d9de3688dbc0a6697949eb427fcaa735b88f10b6fdee0f2c8f76edcc5d06260e1129ca69d6ae30a9')

prepare() {
  cd $srcdir/$pkgname-$pkgver

  if [[ ${pkgver%.*} = ${_debver%.*} ]]; then
    # Debian patches
    export QUILT_PATCHES=debian/patches
    export QUILT_REFRESH_ARGS='-p ab --no-timestamps --no-index'
    export QUILT_DIFF_ARGS='--no-timestamps'

    mv "$srcdir"/debian .

    # Doesn't apply
    rm -v debian/patches/pager.patch || true # /usr/bin/pager appears to be
                                             # absent in Hyperbola

    quilt push -av
  fi
}

build() {
  cd "$pkgname-$pkgver"
  ./configure --prefix=/usr/ --sharedstatedir=/var/lib/ # For FHS compliance
  make
}

package() {
  cd $srcdir/$pkgname-$pkgver
  make INSTALL=/usr/bin/install DESTDIR=$pkgdir install
  install -D -m644 COPYING $pkgdir/usr/share/licenses/$pkgname/COPYING
}
I hereby liberate ALL works of my own posted in the forums, to the fullest extent allowed, under the CC0+a waiver of all other restrictions
Promote love!

57

Re: [Collection] Packages never getting into the repositories or not ready

MamãoMutante wrote:

BTW, does anyone know the licensing status of these AUR and Hyperbola PKGBUILD scripts? I haven't found any information regarding the matter; are they, like, de facto public domain or something?

Exactly for this reasoning the original authors have to be always mentioned within the PKGBUILD-script modified as derivate work. So all is done to grant all people mentioned done work on this script.

Human being in favor with clear principles and so also for freedom in soft- and hardware!

Certainly anyone who has the power to make you believe absurdities has the power to make you commit injustices: For a life of every being full with peace and kindness, including diversity and freedom. Capitalism is destroying our minds, the planet itself and the universe in the end!

58

Re: [Collection] Packages never getting into the repositories or not ready

qpakman

# Maintainer: Tobias Dausend <throgh@hyperbola.info>

pkgname=qpakman
pkgver=0.67
pkgrel=1
pkgdesc="A command-line tool for managing PAK and WAD files"
arch=('i686' 'x86_64')
url='https://github.com/bunder/qpakman'
license=('GPL-2')
depends=('libpng')
makedepends=('cmake')
groups=('games')
source=(${pkgname}-${pkgver}.tar.gz::https://github.com/bunder/qpakman/archive/v${pkgver}.tar.gz)
sha512sums=('9b362d58f66c499c65e1841223e0a832fb990bcbd50457d5cca42190b20a50c2b325845cbdb76a9379a5170f8f52c553cfbebd405a29ea9dc14626ea41e5b844')

build() {
  cmake \
    -B build \
    -S $pkgname-$pkgver \
    -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_INSTALL_PREFIX=/usr
  make -C build
}

package() {
  install -Dm755 "$srcdir/build/$pkgname" -t "$pkgdir/usr/games"
  install -Dm644 "$srcdir/$pkgname-$pkgver/LICENSE" -t "$pkgdir/usr/share/licenses/$pkgname"
}
Human being in favor with clear principles and so also for freedom in soft- and hardware!

Certainly anyone who has the power to make you believe absurdities has the power to make you commit injustices: For a life of every being full with peace and kindness, including diversity and freedom. Capitalism is destroying our minds, the planet itself and the universe in the end!

59

Re: [Collection] Packages never getting into the repositories or not ready

From saravia:

Hi I try compile barrier and I get it, now I share how works


PKBUILD next:

# Maintainer: Morten Linderud <foxboron@archlinux.org>
# Contributor: Tilman BLUMENBACH <tilman+aur AT ax86 DOT net>

pkgname=(barrier barrier-headless)
pkgver=2.4.0
pkgrel=2
pkgdesc="Open-source KVM software based on Synergy"
arch=(x86_64)
url="https://github.com/debauchee/barrier"
license=("custom:GPL2WithOpenSSLException")
changelog=CHANGELOG.rst
depends=(curl libx11 libxrandr libxext
        libxinerama xorgproto libxtst libxi
        libsm libice openssl)
makedepends=(cmake git qt5-base hicolor-icon-theme)
source=("git+https://github.com/debauchee/barrier.git#tag=v${pkgver}")
sha256sums=('SKIP')

prepare() {
    cd "barrier"
    git submodule update --init --recursive
    # lib/platform: Fix encoding for text copied between linux and windows
    # https://github.com/debauchee/barrier/commit/dd3ea8adfef868e52098ea24d2ed08320a90e3b9
    git cherry-pick -n dd3ea8adfef868e52098ea24d2ed08320a90e3b9

    # Add missing cstddef includes for NULL
    # https://github.com/debauchee/barrier/commit/4b12265ae5d324b942698a3177e1d8b1749414d7
    git cherry-pick -n 4b12265ae5d324b942698a3177e1d8b1749414d7
}

build() {
    cd "barrier"

    mkdir -p build
    cd build

    cmake -G "Unix Makefiles" \
        -D CMAKE_BUILD_TYPE:STRING=Release \
        -D CMAKE_INSTALL_PREFIX:STRING=/usr \
        -D BARRIER_REVISION:STRING=00000000 \
        -D BARRIER_VERSION_STAGE:STRING=RELEASE \
        -D AVAHI_COMPAT_NOWARN:bool=true \
        -D BARRIER_BUILD_GUI:bool=false \
        ..
    make
}


_package_common() {
    # Install binaries:
    cd "barrier/build"
    DESTDIR="${pkgdir}" make install

    # Install the license:
    cd ..
    install -m 644 -D LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"

    # Install the manpages:
    mkdir -p "${pkgdir}/usr/share/man/man1"
    install -m 644 doc/*.1 "${pkgdir}/usr/share/man/man1"

    # Install the examples:
    mkdir -p "${pkgdir}/usr/share/doc/${pkgname}"
    install -m 644 doc/barrier.conf* "${pkgdir}/usr/share/doc/${pkgname}"
}

package_barrier() {
    pkgdesc="Open-source KVM software based on Synergy (GUI)"
    depends=("barrier-headless=${pkgver}-${pkgrel}" qt5-base hicolor-icon-theme)

    # Install all the files:
    _package_common

    # Now go and delete files that are already in
    # barrier-headless:
    for file in \
        /usr/share/doc \
        /usr/share/man \
        /usr/bin/barrier{s,c} \
    ;do
        rm -rf "${pkgdir}/${file}"
    done
}

package_barrier-headless() {
    pkgdesc="Open-source KVM software based on Synergy (client and server CLI binaries)"

    # Install all the files:
    _package_common

    # Now go and delete the GUI-related files:
    for file in \
        /usr/bin/barrier \
        /usr/share/applications \
        /usr/share/icons \
    ;do
        rm -rf "${pkgdir}/${file}"
    done
}

maybe is good idea add to repo, is for use one laptop keyboard and mouse with another laptop over LAN conection, is very usefull

Human being in favor with clear principles and so also for freedom in soft- and hardware!

Certainly anyone who has the power to make you believe absurdities has the power to make you commit injustices: For a life of every being full with peace and kindness, including diversity and freedom. Capitalism is destroying our minds, the planet itself and the universe in the end!

60

Re: [Collection] Packages never getting into the repositories or not ready

Package for gradio:

# Maintainer: Tobias Dausend <throgh@hyperbola.info>

pkgname=gradio
pkgver=7.3
pkgrel=1
pkgdesc="GTK+ based application for finding and listening to internet radio stations"
arch=('i686' 'x86_64')
license=('GPL-3')
url='https://github.com/haecker-felix/gradio'
depends=('gtk' 'gstreamer' 'libsoup' 'sqlite' 'json-glib' 'gst-plugins-base')
makedepends=('meson' 'vala' 'cmake' 'gettext-tiny')
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/haecker-felix/Gradio/archive/refs/tags/v${pkgver}.tar.gz")
sha512sums=('d2bfd49ead90627b0516c320a5260f14ba2ea9ab5e417dafc38babc7eaaa706395986122d103bde931406f4240212210d2a7dbee6b69bddb901dc5705cac977b')

build() {
  hyperbola-meson Gradio-$pkgver build
  ninja -C build
}

package() {
  DESTDIR="$pkgdir" meson install -C build

  # remove unwanted data and interfaces
  rm -rf "$pkgdir/usr/share/"{dbus-1,gnome-shell}

  install -Dm644 "$srcdir/Gradio-$pkgver/LICENSE.md" -t "$pkgdir/usr/share/licenses/$pkgname"
}

Attention: Application is starting but malfunctional nevertheless as it is no longer possible to search for any internet-radio.
This package won't be added to Hyperbola! Just meant as "proof of concept" for packaging.

Human being in favor with clear principles and so also for freedom in soft- and hardware!

Certainly anyone who has the power to make you believe absurdities has the power to make you commit injustices: For a life of every being full with peace and kindness, including diversity and freedom. Capitalism is destroying our minds, the planet itself and the universe in the end!

61

Re: [Collection] Packages never getting into the repositories or not ready

Please make in the very first post the entire list of programs that work, it is very inconvenient to leaf through everything that is written here and look for what you need

Radio program - gradio  link created

etc

62

Re: [Collection] Packages never getting into the repositories or not ready

Package hostapd

PKGBUILD

# Maintainer (Arch): Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor (Arch): David Runge <dvzrv@archlinux.org>
# Maintainer: Tobias Dausend <throgh@hyperbola.info>

pkgname=hostapd
pkgver=2.10
pkgrel=1
pkgdesc="IEEE 802.11 AP, IEEE 802.1X/WPA/WPA2/EAP/RADIUS Authenticator"
arch=('i686' 'x86_64')
url='https://w1.fi/hostapd/'
license=('Modified-BSD' 'ISC' 'Public-Domain')
depends=('glibc' 'libnl' 'libressl' 'sqlite')
backup=("etc/${pkgname}/${pkgname}."{accept,conf,deny,eap_user,radius_clients,vlan,wpa_psk})
source=("https://w1.fi/releases/$pkgname-$pkgver.tar.gz"{,.asc}
        "config"
        "copyright::https://metadata.ftp-master.debian.org/changelogs//main/w/wpa/wpa_2.10-12_copyright"
        "${pkgname}.initd"
        "${pkgname}.confd")
sha512sums=('243baa82d621f859d2507d8d5beb0ebda15a75548a62451dc9bca42717dcc8607adac49b354919a41d8257d16d07ac7268203a79750db0cfb34b51f80ff1ce8f'
            'SKIP'
            'eacd2ad295ec8786dac9814218a785eba0ca88e3dcf8b6f3694cba6a8330a8d020ac137623ef35bb0e5c1248f489c79c7fe07a7129a643d5e0dc4804e47f8b17'
            'd2241b2234e5db13b9601f699a8895f9bc7306fd08f6f5ce02c204fb8258d3a9d07a8e09d9704be6e13f14cb8e1da22f0d5efb9660199377be40cd09aa906c49'
            '1771078a125926d5aa9ab1d4c72c8eec6214a0a10767ea312ca9fb7b288ecf46aab1650addb934fd927be0842011205cbd70a821036494ae47d08143a4bf1f7d'
            '0882263bbd7c0b05bf51f51d66e11a23a0b8ca7da2a3b8a30166d2c5f044c0c134e6bccb1d02c9e81819ca8fb0c0fb55c7121a08fe7233ccaa73ff8ab9a238fe')
validpgpkeys=('EC4AA0A991A5F2464582D52D2B6EF432EFC895FA') # Jouni Malinen <j@w1.fi>

prepare() {
  cd "$pkgname-$pkgver"
  # fix include locations in main configuration file
  sed -e 's|/etc/hostapd|/etc/hostapd/hostapd|g' \
      -e 's|/var/run|/run|g' \
      -e 's|radius_attr.sqlite|/var/lib/hostapd/radius_attr.sqlite|g' \
      -e 's|hostapd.cred|/var/lib/hostapd/hostapd.cred|g' \
      -e 's|hostapd.ap_settings|/var/lib/hostapd/hostapd.ap_settings|g' \
      -e 's|hostapd_wps_pin_requests|hostapd/wps_pin_requests|g' \
      -i "${pkgname}/${pkgname}.conf"

  # extract license
  cat "${pkgname}/README" |head -n47 |tail -n5 > LICENSE

  # link build configuration into place:
  # an up-to-date version of the build configuration can be found in
  # hostapd/defconfig and should be diffed with the packaged one before every
  # build
  ln -sv "${srcdir}/config" "${pkgname}/.config"
}

build() {
  make -C $pkgname-$pkgver/$pkgname
}

package() {
  cd "$pkgname-$pkgver"
  make -C "${pkgname}" install DESTDIR="${pkgdir}" BINDIR="/usr/sbin"
  # license
  install -vDm 644 LICENSE "${srcdir}/copyright" -t "$pkgdir/usr/share/licenses/$pkgname/"
  # config
  install -vDm 640 "${pkgname}/${pkgname}."{accept,conf,deny,eap_user,radius_clients,vlan,wpa_psk} -t "${pkgdir}/etc/${pkgname}"
  # docs
  install -vDm 644 "${pkgname}/"{hostapd.sim_db,wired.conf,hlr_auc_gw.{txt,milenage_db}} "${pkgname}/"{README*,ChangeLog} -t "${pkgdir}/usr/share/doc/${pkgname}"
  # man pages
  install -vDm 644 "${pkgname}/${pkgname}.8" -t "$pkgdir/usr/share/man/man8/"
  install -vDm 644 "${pkgname}/${pkgname}_cli.1" -t "$pkgdir/usr/share/man/man1/"
  # state dir
  install -vdm 750 "${pkgdir}/var/lib/${pkgname}"
  # service-configuration
  install -vDm 644 "${srcdir}/${pkgname}.confd" "${pkgdir}/etc/conf.d/${pkgname}"
  install -vDm 755 "${srcdir}/${pkgname}.initd" "${pkgdir}/etc/init.d/${pkgname}"
}

config

# Example hostapd build time configuration
#
# This file lists the configuration options that are used when building the
# hostapd binary. All lines starting with # are ignored. Configuration option
# lines must be commented out complete, if they are not to be included, i.e.,
# just setting VARIABLE=n is not disabling that variable.
#
# This file is included in Makefile, so variables like CFLAGS and LIBS can also
# be modified from here. In most cass, these lines should use += in order not
# to override previous values of the variables.

# Driver interface for Host AP driver
CONFIG_DRIVER_HOSTAP=y

# Driver interface for wired authenticator
CONFIG_DRIVER_WIRED=y

# Driver interface for drivers using the nl80211 kernel interface
CONFIG_DRIVER_NL80211=y

# QCA vendor extensions to nl80211
#CONFIG_DRIVER_NL80211_QCA=y

# driver_nl80211.c requires libnl. If you are compiling it yourself
# you may need to point hostapd to your version of libnl.
#
#CFLAGS += -I$<path to libnl include files>
#LIBS += -L$<path to libnl library files>

# Use libnl v2.0 (or 3.0) libraries.
#CONFIG_LIBNL20=y

# Use libnl 3.2 libraries (if this is selected, CONFIG_LIBNL20 is ignored)
CONFIG_LIBNL32=y


# Driver interface for FreeBSD net80211 layer (e.g., Atheros driver)
#CONFIG_DRIVER_BSD=y
#CFLAGS += -I/usr/local/include
#LIBS += -L/usr/local/lib
#LIBS_p += -L/usr/local/lib
#LIBS_c += -L/usr/local/lib

# Driver interface for no driver (e.g., RADIUS server only)
#CONFIG_DRIVER_NONE=y

# WPA2/IEEE 802.11i RSN pre-authentication
CONFIG_RSN_PREAUTH=y

# Support Operating Channel Validation
#CONFIG_OCV=y

# Integrated EAP server
CONFIG_EAP=y

# EAP Re-authentication Protocol (ERP) in integrated EAP server
CONFIG_ERP=y

# EAP-MD5 for the integrated EAP server
CONFIG_EAP_MD5=y

# EAP-TLS for the integrated EAP server
CONFIG_EAP_TLS=y

# EAP-MSCHAPv2 for the integrated EAP server
CONFIG_EAP_MSCHAPV2=y

# EAP-PEAP for the integrated EAP server
CONFIG_EAP_PEAP=y

# EAP-GTC for the integrated EAP server
CONFIG_EAP_GTC=y

# EAP-TTLS for the integrated EAP server
CONFIG_EAP_TTLS=y

# EAP-SIM for the integrated EAP server
CONFIG_EAP_SIM=y

# EAP-AKA for the integrated EAP server
CONFIG_EAP_AKA=y

# EAP-AKA' for the integrated EAP server
# This requires CONFIG_EAP_AKA to be enabled, too.
#CONFIG_EAP_AKA_PRIME=y

# EAP-PAX for the integrated EAP server
CONFIG_EAP_PAX=y

# EAP-PSK for the integrated EAP server (this is _not_ needed for WPA-PSK)
CONFIG_EAP_PSK=y

# EAP-pwd for the integrated EAP server (secure authentication with a password)
#CONFIG_EAP_PWD=y

# EAP-SAKE for the integrated EAP server
CONFIG_EAP_SAKE=y

# EAP-GPSK for the integrated EAP server
CONFIG_EAP_GPSK=y
# Include support for optional SHA256 cipher suite in EAP-GPSK
CONFIG_EAP_GPSK_SHA256=y

# EAP-FAST for the integrated EAP server
#CONFIG_EAP_FAST=y

# EAP-TEAP for the integrated EAP server
# Note: The current EAP-TEAP implementation is experimental and should not be
# enabled for production use. The IETF RFC 7170 that defines EAP-TEAP has number
# of conflicting statements and missing details and the implementation has
# vendor specific workarounds for those and as such, may not interoperate with
# any other implementation. This should not be used for anything else than
# experimentation and interoperability testing until those issues has been
# resolved.
#CONFIG_EAP_TEAP=y

# Wi-Fi Protected Setup (WPS)
CONFIG_WPS=y
# Enable UPnP support for external WPS Registrars
CONFIG_WPS_UPNP=y
# Enable WPS support with NFC config method
CONFIG_WPS_NFC=y

# EAP-IKEv2
#CONFIG_EAP_IKEV2=y

# Trusted Network Connect (EAP-TNC)
#CONFIG_EAP_TNC=y

# EAP-EKE for the integrated EAP server
#CONFIG_EAP_EKE=y

# PKCS#12 (PFX) support (used to read private key and certificate file from
# a file that usually has extension .p12 or .pfx)
CONFIG_PKCS12=y

# RADIUS authentication server. This provides access to the integrated EAP
# server from external hosts using RADIUS.
CONFIG_RADIUS_SERVER=y

# Build IPv6 support for RADIUS operations
CONFIG_IPV6=y

# IEEE Std 802.11r-2008 (Fast BSS Transition)
CONFIG_IEEE80211R=y

# Use the hostapd's IEEE 802.11 authentication (ACL), but without
# the IEEE 802.11 Management capability (e.g., FreeBSD/net80211)
#CONFIG_DRIVER_RADIUS_ACL=y

# Wireless Network Management (IEEE Std 802.11v-2011)
# Note: This is experimental and not complete implementation.
#CONFIG_WNM=y

# IEEE 802.11ac (Very High Throughput) support
CONFIG_IEEE80211AC=y

# IEEE 802.11ax HE support
# Note: This is experimental and work in progress. The definitions are still
# subject to change and this should not be expected to interoperate with the
# final IEEE 802.11ax version.
CONFIG_IEEE80211AX=y

# Remove debugging code that is printing out debug messages to stdout.
# This can be used to reduce the size of the hostapd considerably if debugging
# code is not needed.
#CONFIG_NO_STDOUT_DEBUG=y

# Add support for writing debug log to a file: -f /tmp/hostapd.log
# Disabled by default.
#CONFIG_DEBUG_FILE=y

# Send debug messages to syslog instead of stdout
#CONFIG_DEBUG_SYSLOG=y

# Add support for sending all debug messages (regardless of debug verbosity)
# to the Linux kernel tracing facility. This helps debug the entire stack by
# making it easy to record everything happening from the driver up into the
# same file, e.g., using trace-cmd.
#CONFIG_DEBUG_LINUX_TRACING=y

# Remove support for RADIUS accounting
#CONFIG_NO_ACCOUNTING=y

# Remove support for RADIUS
#CONFIG_NO_RADIUS=y

# Remove support for VLANs
#CONFIG_NO_VLAN=y

# Enable support for fully dynamic VLANs. This enables hostapd to
# automatically create bridge and VLAN interfaces if necessary.
#CONFIG_FULL_DYNAMIC_VLAN=y

# Use netlink-based kernel API for VLAN operations instead of ioctl()
# Note: This requires libnl 3.1 or newer.
#CONFIG_VLAN_NETLINK=y

# Remove support for dumping internal state through control interface commands
# This can be used to reduce binary size at the cost of disabling a debugging
# option.
#CONFIG_NO_DUMP_STATE=y

# Enable tracing code for developer debugging
# This tracks use of memory allocations and other registrations and reports
# incorrect use with a backtrace of call (or allocation) location.
#CONFIG_WPA_TRACE=y
# For BSD, comment out these.
#LIBS += -lexecinfo
#LIBS_p += -lexecinfo
#LIBS_c += -lexecinfo

# Use libbfd to get more details for developer debugging
# This enables use of libbfd to get more detailed symbols for the backtraces
# generated by CONFIG_WPA_TRACE=y.
#CONFIG_WPA_TRACE_BFD=y
# For BSD, comment out these.
#LIBS += -lbfd -liberty -lz
#LIBS_p += -lbfd -liberty -lz
#LIBS_c += -lbfd -liberty -lz

# hostapd depends on strong random number generation being available from the
# operating system. os_get_random() function is used to fetch random data when
# needed, e.g., for key generation. On Linux and BSD systems, this works by
# reading /dev/urandom. It should be noted that the OS entropy pool needs to be
# properly initialized before hostapd is started. This is important especially
# on embedded devices that do not have a hardware random number generator and
# may by default start up with minimal entropy available for random number
# generation.
#
# As a safety net, hostapd is by default trying to internally collect
# additional entropy for generating random data to mix in with the data
# fetched from the OS. This by itself is not considered to be very strong, but
# it may help in cases where the system pool is not initialized properly.
# However, it is very strongly recommended that the system pool is initialized
# with enough entropy either by using hardware assisted random number
# generator or by storing state over device reboots.
#
# hostapd can be configured to maintain its own entropy store over restarts to
# enhance random number generation. This is not perfect, but it is much more
# secure than using the same sequence of random numbers after every reboot.
# This can be enabled with -e<entropy file> command line option. The specified
# file needs to be readable and writable by hostapd.
#
# If the os_get_random() is known to provide strong random data (e.g., on
# Linux/BSD, the board in question is known to have reliable source of random
# data from /dev/urandom), the internal hostapd random pool can be disabled.
# This will save some in binary size and CPU use. However, this should only be
# considered for builds that are known to be used on devices that meet the
# requirements described above.
#CONFIG_NO_RANDOM_POOL=y

# Should we attempt to use the getrandom(2) call that provides more reliable
# yet secure randomness source than /dev/random on Linux 3.17 and newer.
# Requires glibc 2.25 to build, falls back to /dev/random if unavailable.
#CONFIG_GETRANDOM=y

# Should we use poll instead of select? Select is used by default.
#CONFIG_ELOOP_POLL=y

# Should we use epoll instead of select? Select is used by default.
#CONFIG_ELOOP_EPOLL=y

# Should we use kqueue instead of select? Select is used by default.
#CONFIG_ELOOP_KQUEUE=y

# Select TLS implementation
# openssl = OpenSSL (default)
# gnutls = GnuTLS
# internal = Internal TLSv1 implementation (experimental)
# linux = Linux kernel AF_ALG and internal TLSv1 implementation (experimental)
# none = Empty template
#CONFIG_TLS=openssl

# TLS-based EAP methods require at least TLS v1.0. Newer version of TLS (v1.1)
# can be enabled to get a stronger construction of messages when block ciphers
# are used.
#CONFIG_TLSV11=y

# TLS-based EAP methods require at least TLS v1.0. Newer version of TLS (v1.2)
# can be enabled to enable use of stronger crypto algorithms.
#CONFIG_TLSV12=y

# Select which ciphers to use by default with OpenSSL if the user does not
# specify them.
#CONFIG_TLS_DEFAULT_CIPHERS="DEFAULT:!EXP:!LOW"

# If CONFIG_TLS=internal is used, additional library and include paths are
# needed for LibTomMath. Alternatively, an integrated, minimal version of
# LibTomMath can be used. See beginning of libtommath.c for details on benefits
# and drawbacks of this option.
#CONFIG_INTERNAL_LIBTOMMATH=y
#ifndef CONFIG_INTERNAL_LIBTOMMATH
#LTM_PATH=/usr/src/libtommath-0.39
#CFLAGS += -I$(LTM_PATH)
#LIBS += -L$(LTM_PATH)
#LIBS_p += -L$(LTM_PATH)
#endif
# At the cost of about 4 kB of additional binary size, the internal LibTomMath
# can be configured to include faster routines for exptmod, sqr, and div to
# speed up DH and RSA calculation considerably
#CONFIG_INTERNAL_LIBTOMMATH_FAST=y

# Interworking (IEEE 802.11u)
# This can be used to enable functionality to improve interworking with
# external networks.
#CONFIG_INTERWORKING=y

# Hotspot 2.0
#CONFIG_HS20=y

# Enable SQLite database support in hlr_auc_gw, EAP-SIM DB, and eap_user_file
CONFIG_SQLITE=y

# Enable Fast Session Transfer (FST)
#CONFIG_FST=y

# Enable CLI commands for FST testing
#CONFIG_FST_TEST=y

# Testing options
# This can be used to enable some testing options (see also the example
# configuration file) that are really useful only for testing clients that
# connect to this hostapd. These options allow, for example, to drop a
# certain percentage of probe requests or auth/(re)assoc frames.
#
#CONFIG_TESTING_OPTIONS=y

# Automatic Channel Selection
# This will allow hostapd to pick the channel automatically when channel is set
# to "acs_survey" or "0". Eventually, other ACS algorithms can be added in
# similar way.
#
# Automatic selection is currently only done through initialization, later on
# we hope to do background checks to keep us moving to more ideal channels as
# time goes by. ACS is currently only supported through the nl80211 driver and
# your driver must have survey dump capability that is filled by the driver
# during scanning.
#
# You can customize the ACS survey algorithm with the hostapd.conf variable
# acs_num_scans.
#
# Supported ACS drivers:
# * ath9k
# * ath5k
# * ath10k
#
# For more details refer to:
# https://wireless.wiki.kernel.org/en/users/documentation/acs
#
CONFIG_ACS=y

# Multiband Operation support
# These extensions facilitate efficient use of multiple frequency bands
# available to the AP and the devices that may associate with it.
#CONFIG_MBO=y

# Client Taxonomy
# Has the AP retain the Probe Request and (Re)Association Request frames from
# a client, from which a signature can be produced which can identify the model
# of client device like "Nexus 6P" or "iPhone 5s".
#CONFIG_TAXONOMY=y

# Fast Initial Link Setup (FILS) (IEEE 802.11ai)
#CONFIG_FILS=y
# FILS shared key authentication with PFS
#CONFIG_FILS_SK_PFS=y

# Include internal line edit mode in hostapd_cli. This can be used to provide
# limited command line editing and history support.
#CONFIG_WPA_CLI_EDIT=y

# Opportunistic Wireless Encryption (OWE)
# Experimental implementation of draft-harkins-owe-07.txt
#CONFIG_OWE=y

# Airtime policy support
#CONFIG_AIRTIME_POLICY=y

# Override default value for the wpa_disable_eapol_key_retries configuration
# parameter. See that parameter in hostapd.conf for more details.
#CFLAGS += -DDEFAULT_WPA_DISABLE_EAPOL_KEY_RETRIES=1

# Wired equivalent privacy (WEP)
# WEP is an obsolete cryptographic data confidentiality algorithm that is not
# considered secure. It should not be used for anything anymore. The
# functionality needed to use WEP is available in the current hostapd
# release under this optional build parameter. This functionality is subject to
# be completely removed in a future release.
#CONFIG_WEP=y

# Remove all TKIP functionality
# TKIP is an old cryptographic data confidentiality algorithm that is not
# considered secure. It should not be used anymore. For now, the default hostapd
# build includes this to allow mixed mode WPA+WPA2 networks to be enabled, but
# that functionality is subject to be removed in the future.
#CONFIG_NO_TKIP=y

# Pre-Association Security Negotiation (PASN)
# Experimental implementation based on IEEE P802.11z/D2.6 and the protocol
# design is still subject to change. As such, this should not yet be enabled in
# production use.
# This requires CONFIG_IEEE80211W=y to be enabled, too.
#CONFIG_PASN=y

# Device Provisioning Protocol (DPP) (also known as Wi-Fi Easy Connect)
CONFIG_DPP=y
# DPP version 2 support
CONFIG_DPP2=y
# DPP version 3 support (experimental and still changing; do not enable for
# production use)
#CONFIG_DPP3=y

# custom configuration options

# IEEE 802.11F/IAPP
CONFIG_IAPP=y

# IEEE 802.11w (management frame protection)
CONFIG_IEEE80211W=y

# IEEE 802.11n (High Throughput) support
CONFIG_IEEE80211N=y

CONFIG_MESH=y
CONFIG_SAE=y
CONFIG_WPS2=y

hostapd.initd

#!/sbin/openrc-run
# Copyright 1999-2006 Gentoo Foundation
# Modifications for Hyperbola Project 2024
# Distributed under the terms of the GNU General Public License v2

command="/usr/sbin/hostapd"
command_args="-B ${OPTIONS} ${CONFIGS}"
extra_started_commands="reload"
required_files="$CONFIGS"

depend() {
    need net
    after firewall
    use logger
}

reload() {
    ebegin "Reloading ${SVCNAME} configuration"
    kill -HUP $(pidof /usr/bin/hostapd) > /dev/null 2>&1
    eend $?
}

hostapd.confd

# Space separated list of configuration files
CONFIGS="/etc/hostapd/hostapd.conf"

# Extra options to pass to hostapd, see hostapd(8)
OPTIONS=""
Human being in favor with clear principles and so also for freedom in soft- and hardware!

Certainly anyone who has the power to make you believe absurdities has the power to make you commit injustices: For a life of every being full with peace and kindness, including diversity and freedom. Capitalism is destroying our minds, the planet itself and the universe in the end!

63

Re: [Collection] Packages never getting into the repositories or not ready

Package mtr and mtr-gtk

PKGBUILD

# Maintainer (Arch): Levente Polyak <anthraxx[at]archlinux[dot]org>
# Contributor (Arch): Ionut Biru <ibiru@archlinux.org>
# Contributor (Arch): Douglas Soares de Andrade <douglas@archlinux.org>
# Maintainer: Tobias Dausend <throgh@hyperbola.info>

pkgbase=mtr
pkgname=('mtr' 'mtr-gtk')
pkgver=0.95
pkgrel=1
pkgdesc="Combines the functionality of traceroute and ping into one tool"
url='https://www.bitwizard.nl/mtr/'
arch=('i686' 'x86_64')
license=('GPL-2')
makedepends=('gdk-pixbuf2' 'glibc' 'gtk' 'jansson' 'libcap' 'ncurses')
install=mtr.install
source=(https://github.com/traviscross/mtr/archive/v${pkgver}/${pkgname}-${pkgver}.tar.gz)
sha512sums=('a7d69e0c551a10ae80a650a34588119e6c6b124a8c2c93d3de29e5daa6ef99f9217d875529d443c3760cd6fd7bd04d1e9abe33ef12635826c66a98bd776c1690')

prepare() {
  (cd ${pkgbase}-${pkgver}
    echo "${pkgver}" > .tarball-version
    autoreconf -fiv
  )
  cp -ra ${pkgbase}-${pkgver}{,-cli}
}

build() {
  (cd ${pkgbase}-${pkgver}-cli
    ./configure \
      --prefix=/usr \
      --without-gtk \
      --sbindir=/usr/bin
    make
  )
  (cd ${pkgbase}-${pkgver}
    ./configure \
      --prefix=/usr \
      --sbindir=/usr/bin
    make
  )
}

package_mtr() {
  pkgdesc="Combines the functionality of traceroute and ping into one tool (CLI version)"
  depends=('glibc' 'jansson' 'libcap' 'ncurses')
  optdepends=('bash-completion: bash completion support')
  cd ${pkgbase}-${pkgver}-cli
  make DESTDIR="${pkgdir}" install
  install -Dm644 COPYING -t "${pkgdir}/usr/share/licenses/${pkgname}"
}

package_mtr-gtk() {
  pkgdesc="Combines the functionality of traceroute and ping into one tool (GTK version)"
  depends=('gdk-pixbuf2' 'glib2' 'glibc' 'gtk' 'jansson' 'libcap' 'ncurses')
  optdepends=('bash-completion: bash completion support')
  conflicts=('mtr')
  provides=("mtr=${pkgver}")
  cd ${pkgbase}-${pkgver}
  make DESTDIR="${pkgdir}" install
  install -Dm644 COPYING -t "${pkgdir}/usr/share/licenses/${pkgname}"
}

mtr.install

post_install() {
  setcap cap_net_bind_service,cap_net_raw+ep usr/bin/mtr-packet
}

post_upgrade() {
  post_install
}
Human being in favor with clear principles and so also for freedom in soft- and hardware!

Certainly anyone who has the power to make you believe absurdities has the power to make you commit injustices: For a life of every being full with peace and kindness, including diversity and freedom. Capitalism is destroying our minds, the planet itself and the universe in the end!

64

Re: [Collection] Packages never getting into the repositories or not ready

Package cataclysm-dda

# Maintainer (Arch): Sven-Hendrik Haase <svenstaro@archlinux.org>
# Contributor (Arch): Kyle Keen <keenerd@gmail.com>
# Maintainer: Tobias Dausend <throgh@hyperbola.info>

pkgbase=cataclysm-dda
pkgname=('cataclysm-dda' 'cataclysm-dda-tiles')
pkgname=cataclysm-dda
pkgver=0.F
_pkgver=0.F
_debver=$_pkgver
_debrel=3-9
pkgrel=1
pkgdesc="A post-apocalyptic, roguelike, free and libre game"
url='https://cataclysmdda.org/'
arch=('i686' 'x86_64')
license=('CC-BY-SA-3.0' 'Modified-BSD' 'Boost-1.0' 'GPL-3' 'Expat')
groups=('games')
depends=('ncurses' 'hicolor-icon-theme' 'gettext-tiny')
makedepends=('sdl2_image' 'sdl2_ttf' 'sdl2_mixer' 'freetype2' 'astyle' 'quilt')
source=("$pkgname-$_pkgver.tar.gz::https://github.com/CleverRaven/Cataclysm-DDA/archive/$_pkgver.tar.gz"
        "https://deb.debian.org/debian/pool/main/c/cataclysm-dda/cataclysm-dda_$_debver-$_debrel.debian.tar.xz")
sha512sums=('9dd32f6fda936b77007a1f0e3fca85c25c3c87f41819fa55b0c454c2cc756664a688c910bd981bc1ba14859401d0d8eebd1515d1b9d4a34d6ffe0303e699eb0b'
            '2aa1ebe42034e4f3ee48125db21baa299da8407f97bff81a42c04d82906e81298057f22e427b68f5738b9674b0d5bec06c51acc7a0c8ec67be1d6aa2d54b933e')

prepare() {
  cd "Cataclysm-DDA-$_pkgver"
  if [[ ${pkgver%.*} = ${_debver%.*} ]]; then
    # Debian patches
    export QUILT_PATCHES=debian/patches
    export QUILT_REFRESH_ARGS='-p ab --no-timestamps --no-index'
    export QUILT_DIFF_ARGS='--no-timestamps'

    mv "$srcdir"/debian/ ./

    quilt push -av
  fi
}

build() {
  cd "Cataclysm-DDA-$_pkgver"

  export CXXFLAGS="${CXXFLAGS/-Wp,-D_GLIBCXX_ASSERTIONS}"
  export CXXFLAGS="${CXXFLAGS/-fcf-protection}"
  export CXXFLAGS="${CXXFLAGS/-fstack-clash-protection}"

  make PREFIX=/usr PCH=0 ASTYLE=0 RELEASE=1 USE_XDG_DIR=1 LTO=1 RUNTESTS=0 LOCALIZE=1 LANGUAGES=all
  make PREFIX=/usr PCH=0 ASTYLE=0 RELEASE=1 USE_XDG_DIR=1 LTO=1 RUNTESTS=0 LOCALIZE=1 LANGUAGES=all TILES=1 SOUND=1
  ./lang/compile_mo.sh
}

package_cataclysm-dda() {
  cd "Cataclysm-DDA-$_pkgver"

  make DESTDIR="$pkgdir" PREFIX=/usr PCH=0 RELEASE=1 USE_XDG_DIR=1 LTO=1 RUNTESTS=0 LOCALIZE=1 LANGUAGES=all install

  # Docs
  install -d "$pkgdir/usr/share/doc/cataclysm-dda"
  cp -r doc/* "$pkgdir/usr/share/doc/cataclysm-dda"
  # undo symlink
  rm "$pkgdir/usr/share/doc/cataclysm-dda/JSON_LOADING_ORDER.md"
  cp 'data/json/LOADING_ORDER.md' "$pkgdir/usr/share/doc/cataclysm-dda/JSON_LOADING_ORDER.md"

  # Manpage
  rm "$pkgdir/usr/share/doc/cataclysm-dda/"*.6
  install -Dm644 -t "$pkgdir/usr/share/man/man6" "doc/cataclysm.6"

  # License
  install -Dm644 LICENSE.txt debian/copyright -t "$pkgdir/usr/share/licenses/$pkgname"

  # Languages
  cd lang/mo
  for i in *; do
    install -d "${pkgdir}/usr/share/locale/${i}/LC_MESSAGES"
    cp "${i}/LC_MESSAGES/cataclysm-dda.mo" "${pkgdir}/usr/share/locale/${i}/LC_MESSAGES"
  done
}

package_cataclysm-dda-tiles() {
  pkgdesc="A post-apocalyptic, roguelike, free and libre game (with graphics)"
  depends=('cataclysm-dda' 'sdl2_image' 'sdl2_ttf' 'freetype2' 'sdl2_mixer')
  cd "Cataclysm-DDA-$_pkgver"

  make DESTDIR="$pkgdir" PREFIX=/usr PCH=0 RELEASE=1 USE_XDG_DIR=1 LTO=1 LOCALIZE=1 LANGUAGES=all TILES=1 SOUND=1 install

  # Icons
  cd build-data/osx/AppIcon.iconset
  for i in *.png
  do
    local _isize="$(echo "$i" | sed -Ee 's/icon_([[:digit:]]+)x\1\.png/\1x\1/')"
    install -Dm644 "$i" "$pkgdir/usr/share/icons/hicolor/$_isize/apps/cataclysm-dda.png"
  done
  cd "$srcdir/Cataclysm-DDA-$_pkgver"

  # Manpage
  install -Dm644 -t "$pkgdir/usr/share/man/man6" "doc/cataclysm-tiles.6"

  # License
  install -Dm644 LICENSE.txt debian/copyright -t "$pkgdir/usr/share/licenses/$pkgname"

  # Remove overlapping files
  cd "$pkgdir/../cataclysm-dda"
  find . -type f -exec rm -f "$pkgdir"/{} \;
  cd "$pkgdir"
  find . -type d -empty -delete
}
Human being in favor with clear principles and so also for freedom in soft- and hardware!

Certainly anyone who has the power to make you believe absurdities has the power to make you commit injustices: For a life of every being full with peace and kindness, including diversity and freedom. Capitalism is destroying our minds, the planet itself and the universe in the end!

65

Re: [Collection] Packages never getting into the repositories or not ready

Package desmume

PKGBUILD

# Maintainer (Arch): schuay <jakob.gruber@gmail.com>
# Contributor (Arch): Jonathan Conder <jonno dot conder at gmail dot com>
# Contributor (Arch): Brad Fanella <bradfanella@archlinux.us>
# Contributor (Arch): Arkham <arkham at archlinux dot us>
# Contributor (Arch): Nathan Jones <nathanj@insightbb.com>
# Contributor (Arch): Javier "Phrodo_00" Aravena <phrodo.00 at gmail dot com>
# Contributor (Arch): angvp <angvp at archlinux dot us>
# Contributor (Arch): Allan <mcrae_allan at hotmail dot com>
# Contributor (Arch): w0rm <w0rmtux at gmail dot com>
# Contributor (Arch): vEX <vex at niechift dot com>
# Contributor (Arch): Asher256 <achrafcherti at gmail dot com>
# Maintainer: Tobias Dausend <throgh@hyperbola.info>

pkgname=desmume
pkgver=0.9.11
_debver=$pkgver
_debrel=4.1
pkgrel=2
pkgdesc="Nintendo DS emulator"
arch=('i686' 'x86_64')
url="https://desmume.org/"
license=('GPL-2')
depends=('desktop-file-utils' 'libpcap' 'soundtouch' 'alsa-lib' 'glu' 'sdl' 'gtk2' 'zziplib' 'tinyxml')
makedepends=('quilt' 'intltool' 'mesa' 'clang')
source=("https://downloads.sourceforge.net/${pkgname}/${pkgname}-${pkgver}.tar.gz"
        "https://deb.debian.org/debian/pool/main/d/desmume/desmume_${_debver}-${_debrel}.debian.tar.xz")
sha512sums=('160cb6ec0ede04ad1fbddde2b7b04aa41fa464c8338d7eb9d7536196a82d8d716889b40be4fb831a22e3fe8532b947f7f0b41311601b6842be2516dff7cae46c'
            '22979722b6adfcbe44c908e727b563e3ee7653a36a372df36bba81b2743eaa24d328f11ccf378903288537c2459de7e6ed1f84716e2c52ba1235829a2db13705')

prepare() {
  cd "$srcdir/$pkgname-$pkgver"

  if [[ ${pkgver%.*} = ${_debver%.*} ]]; then
    # Debian patches
    export QUILT_PATCHES=debian/patches
    export QUILT_REFRESH_ARGS='-p ab --no-timestamps --no-index'
    export QUILT_DIFF_ARGS='--no-timestamps'

    mv "$srcdir"/debian .

    quilt push -av
  fi
}

build() {
  cd "$srcdir/$pkgname-$pkgver"

  ./configure \
    --prefix=/usr \
    --enable-wifi \
    --enable-openal
  make
}

package() {
  cd "$srcdir/$pkgname-$pkgver"

  make DESTDIR="$pkgdir/" install
  install -Dm644 COPYING -t "$pkgdir/usr/share/licenses/$pkgname"
}

gcc6_fixes.patch

From: zeromus
Origin: upstream, https://sourceforge.net/p/desmume/code/5514, https://sourceforge.net/p/desmume/code/5517, https://sourceforge.net/p/desmume/code/5430
Subject: fix GCC6 issues
Bug: https://sourceforge.net/p/desmume/bugs/1570/
Bug-Debian: http://bugs.debian.org/811691

Index: desmume/src/MMU_timing.h
===================================================================
--- desmume/src/MMU_timing.h    (revision 5513)
+++ desmume/src/MMU_timing.h    (revision 5517)
@@ -155,8 +155,8 @@
     enum { ASSOCIATIVITY = 1 << ASSOCIATIVESHIFT };
     enum { BLOCKSIZE = 1 << BLOCKSIZESHIFT };
     enum { TAGSHIFT = SIZESHIFT - ASSOCIATIVESHIFT };
-    enum { TAGMASK = (u32)(~0 << TAGSHIFT) };
-    enum { BLOCKMASK = ((u32)~0 >> (32 - TAGSHIFT)) & (u32)(~0 << BLOCKSIZESHIFT) };
+    enum { TAGMASK = (u32)(~0U << TAGSHIFT) };
+    enum { BLOCKMASK = ((u32)~0U >> (32 - TAGSHIFT)) & (u32)(~0U << BLOCKSIZESHIFT) };
     enum { WORDSIZE = sizeof(u32) };
     enum { WORDSPERBLOCK = (1 << BLOCKSIZESHIFT) / WORDSIZE };
     enum { DATAPERWORD = WORDSIZE * ASSOCIATIVITY };
Index: desmume/src/ctrlssdl.cpp
===================================================================
--- desmume/src/ctrlssdl.cpp    (revision 5513)
+++ desmume/src/ctrlssdl.cpp    (revision 5517)
@@ -200,7 +200,7 @@
           break;
         case SDL_JOYAXISMOTION:
           /* Dead zone of 50% */
-          if( (abs(event.jaxis.value) >> 14) != 0 )
+          if( ((u32)abs(event.jaxis.value) >> 14) != 0 )
             {
               key = ((event.jaxis.which & 15) << 12) | JOY_AXIS << 8 | ((event.jaxis.axis & 127) << 1);
               if (event.jaxis.value > 0) {
@@ -370,7 +370,7 @@
          Note: button constants have a 1bit offset. */
     case SDL_JOYAXISMOTION:
       key_code = ((event->jaxis.which & 15) << 12) | JOY_AXIS << 8 | ((event->jaxis.axis & 127) << 1);
-      if( (abs(event->jaxis.value) >> 14) != 0 )
+      if( ((u32)abs(event->jaxis.value) >> 14) != 0 )
         {
           if (event->jaxis.value > 0)
             key_code |= 1;
Index: desmume/src/wifi.cpp
===================================================================
--- desmume/src/wifi.cpp    (revision 5429)
+++ desmume/src/wifi.cpp    (revision 5430)
@@ -320,9 +320,9 @@
 
 #if (WIFI_LOGGING_LEVEL >= 1)
     #if WIFI_LOG_USE_LOGC
-        #define WIFI_LOG(level, ...) if(level <= WIFI_LOGGING_LEVEL) LOGC(8, "WIFI: "__VA_ARGS__);
+        #define WIFI_LOG(level, ...) if(level <= WIFI_LOGGING_LEVEL) LOGC(8, "WIFI: " __VA_ARGS__);
     #else
-        #define WIFI_LOG(level, ...) if(level <= WIFI_LOGGING_LEVEL) printf("WIFI: "__VA_ARGS__);
+        #define WIFI_LOG(level, ...) if(level <= WIFI_LOGGING_LEVEL) printf("WIFI: " __VA_ARGS__);
     #endif
 #else
 #define WIFI_LOG(level, ...) {}

gcc7_fixes.patch

From e1f7039f1b06add4fb75b2f8774000b8f05574af Mon Sep 17 00:00:00 2001
From: rogerman <rogerman@users.sf.net>
Date: Mon, 17 Aug 2015 21:15:04 +0000
Subject: Fix bug with libfat string handling.

diff --git a/src/utils/libfat/directory.cpp b/src/utils/libfat/directory.cpp
index 765d7ae5..b6d7f01f 100644
--- a/src/utils/libfat/directory.cpp
+++ b/src/utils/libfat/directory.cpp
@@ -139,7 +139,7 @@ static size_t _FAT_directory_mbstoucs2 (ucs2_t* dst, const char* src, size_t len
     int bytes;
     size_t count = 0;
 
-    while (count < len-1 && src != '\0') {
+    while (count < len-1 && *src != '\0') {
         bytes = mbrtowc (&tempChar, src, MB_CUR_MAX, &ps);
         if (bytes > 0) {
             *dst = (ucs2_t)tempChar;
Human being in favor with clear principles and so also for freedom in soft- and hardware!

Certainly anyone who has the power to make you believe absurdities has the power to make you commit injustices: For a life of every being full with peace and kindness, including diversity and freedom. Capitalism is destroying our minds, the planet itself and the universe in the end!