void-linux / void-packages

The Void source packages collection
https://voidlinux.org
Other
2.53k stars 2.12k forks source link

vinstall doesn't work with wildcards? #26881

Closed muni-corn closed 3 years ago

muni-corn commented 3 years ago

Tried rebasing with this repository's master branch and it didn't fix the following issue:

vinstall in the following template yields the error cannot find 'VST2_SDK/public.sdk/source/vst2.x/*'...

I've confirmed with an ls that the files do in fact exist at that path.

Am I doing this the wrong way? Is there a workaround?

Template:

# Template file for 'steinberg-vst36'
pkgname=steinberg-vst36
version=3.6.7
revision=1
short_desc="Steinberg's VST SDK (version 3.6)"
maintainer="Harrison Thorne <harrisonthorne@protonmail.com>"
license="Custom:?"
homepage="http://www.steinberg.net/en/company/developers.html"
distfiles="https://www.steinberg.net/sdk_downloads/vstsdk367_03_03_2017_build_352.zip"
checksum=5e8f1058177472f6dd3b5c1e7f8e0e76f37c5f751fed65936e04ff2441ce831a
wrksrc="VST_SDK"

do_install() {
    ls VST2_SDK/public.sdk/source/vst2.x
    vmkdir usr/include/vst36/pluginterfaces/vst2.x
    vinstall "VST2_SDK/public.sdk/source/vst2.x/*" 644 "usr/include/vst36/"
    vinstall "VST2_SDK/pluginterfaces/vst2.x/*" 644 "usr/include/vst36/pluginterfaces/vst2.x/"

    vlicense VST3_SDK/doc/*License*
}
CameronNemo commented 3 years ago

you may be able to use vcopy, a for loop with vinstall, or regular coreutils with the DESTDIR variable

lane-core commented 3 years ago

compare to my template @harrisonthorne. not ultra polished but close enough for my own use, I used this package to build the distrho plugin pack.

# Template file for 'steinberg-vst'

pkgname=steinberg-vst
version=3.6.14
revision=2
short_desc="Steinberg's VST SDK (version 3.6)"
homepage="https://www.steinberg.net/sdk_downloads/"
hostmakedepends="unzip"
maintainer="lane-brain <lane@mailbox.org>"
_sdkarchive="vst-sdk_3.6.14_build-24_2019-11-29.zip"
distfiles="https://download.steinberg.net/sdk_downloads/${_sdkarchive}"
wrksrc=${pkgname}-${version}
license="custom:Steinberg"
checksum=1f61d847d4fbd570a2b3d3cc14210b4e7f808f87b641a44b146a07f708cb1552
repository=nonfree

do_extract() {
    unzip ${XBPS_SRCDISTDIR}/${pkgname}-${version}/${_sdkarchive}
}

pre_install() {
    cd ${wrksrc}/VST_SDK
    cp -r VST2_SDK/* VST3_SDK
}

do_install() {
  # install headers
    local vst_sdk_path="${wrksrc}/VST_SDK/VST3_SDK/public.sdk/source"
    local header_path="/usr/include/vst36"

    mkdir -p ${DESTDIR}${header_path}
    cd ${header_path}
    vcopy ${vst_sdk_path} ${header_path}

    mkdir -p ${DESTDIR}${header_path}/pluginterfaces/vst
    vcopy ${vst_sdk_path}/../../pluginterfaces/vst ${header_path}/pluginterfaces/vst
}

post_install() {
    vlicense ${wrksrc}/VST_SDK/VST3_SDK/LICENSE.txt
}
muni-corn commented 3 years ago

@lane-brain Thanks! Do you happen to have a working template for airwave? https://github.com/psycha0s/airwave I'm working on one but struggling to get it to compile. Dependency issues. I'll post an edit with the errors

lane-core commented 3 years ago

Actually hold off on that template, it looks like a mistaken edit of mine I made after I successfully built the package is holding it up after running to make sure it works

lane-core commented 3 years ago

@harrisonthorne I finished editing the package and will post, first I'm packaging my distrho template with it to make sure it works (stuck in compilation atm).

Also, personally I never really liked airwave and found yabridge to be a much nicer vst wrapper system to use. Maybe you should take a look: https://github.com/robbert-vdh/yabridge

muni-corn commented 3 years ago

That will be amazing, I would like something more up-to-date than airwave. Thank you!

lane-core commented 3 years ago

I had to zap my xbps-src dir earlier so this recomp is taking longer than expected. If you want to test the below do it and let me know if it works, I'll confirm on my side.... not! this definitely won't work :)

lane-core commented 3 years ago

@harrisonthorne I was able to build dexed vst and vst3 plugins with this installed. Can you confirm if it will work for your templates? Also I decided to change the package name to use the "-devel" convention for development packages.

# Template file for 'steinberg-vst-devel'

pkgname=steinberg-vst-devel
version=3.6.14
revision=1
short_desc="Steinberg's VST SDK (version 3.6)"
homepage="https://www.steinberg.net/sdk_downloads/"
hostmakedepends="unzip"
maintainer="lane-brain <lane@mailbox.org>"
_sdkarchive="vst-sdk_3.6.14_build-24_2019-11-29.zip"
distfiles="https://download.steinberg.net/sdk_downloads/${_sdkarchive}
    https://www.steinberg.net/sdk_downloads/vstsdk367_03_03_2017_build_352.zip"
wrksrc=${pkgname}-${version}
license="custom:Steinberg"
checksum="1f61d847d4fbd570a2b3d3cc14210b4e7f808f87b641a44b146a07f708cb1552
    5e8f1058177472f6dd3b5c1e7f8e0e76f37c5f751fed65936e04ff2441ce831a"
repository=nonfree

do_extract() {
    mkdir current vst-sdk-367

    cd current
    unzip ${XBPS_SRCDISTDIR}/${pkgname}-${version}/${_sdkarchive}

    cd ../vst-sdk-367
    unzip ${XBPS_SRCDISTDIR}/${pkgname}-${version}/vstsdk367_03_03_2017_build_352.zip
}

pre_install() {
    cd ${wrksrc}/current/VST_SDK
    cp -r VST2_SDK/* VST3_SDK
}

do_install() {
    # Install headers
    echo "do_install: $PWD"
    vst_sdk_path="${wrksrc}/current/VST_SDK/VST3_SDK"
    vst_legacy_path="${wrksrc}/vst-sdk-367/VST_SDK"
    header_path="usr/include/vst36"

    mkdir -p ${DESTDIR}/${header_path}
    vcopy ${vst_sdk_path}/* ${header_path}

    mkdir -p ${DESTDIR}/${header_path}/pluginterfaces/vst
    vcopy ${vst_sdk_path}/pluginterfaces/vst ${header_path}/pluginterfaces/vst

    # Install legacy headers from 3.6.7. According to the notes:
    #
    # "The VST2 SDK is not part anymore of the VST3 SDK, you have to use 
    # an older version of the SDK and copy the VST2_SDK folder into the VST_SDK folder."
    vcopy ${vst_legacy_path}/VST2_SDK/pluginterfaces/vst2.x ${header_path}/pluginterfaces

    # Clean up unneeded files/directories
    cd ${DESTDIR}/${header_path}
    rm -r tools bin
}

post_install() {
    vlicense ${wrksrc}/current/VST_SDK/VST3_SDK/LICENSE.txt
    vlicense ${wrksrc}/current/VST_SDK/VST3_SDK/VST3_License_Agreement.pdf
}
ericonr commented 3 years ago

For the most part you're supposed to either loop or use vcopy. If you wish to also support globbing, feel free to open a PR. It would likely require some testing to guarantee no regressions with other packages.