Ticket #31185: no_no_variants.patch

File no_no_variants.patch, 4.3 KB (added by neverpanic (Clemens Lang), 13 years ago)

Patch against Portfile

  • Portfile

     
    99conflicts       ffmpeg-devel
    1010epoch           1
    1111version         0.7.3
    12 license         nonfree GPL-2+ LGPL-2.1+
     12license         LGPL-2.1+
    1313categories      multimedia
    1414maintainers     devans openmaintainer
    1515
     
    6363                port:libtheora \
    6464                port:dirac \
    6565                port:schroedinger \
    66                 port:faac \
    67                 port:faad2 \
    6866                path:lib/libspeex.dylib:speex \
    69                 port:XviD \
    70                 port:x264 \
    7167                port:libvpx \
    7268                path:lib/pkgconfig/sdl.pc:libsdl \
    7369                port:bzip2 \
     
    10399
    104100configure.cflags-append    -DHAVE_LRINTF ${configure.cppflags}
    105101configure.args \
    106         --enable-gpl \
    107         --enable-postproc \
    108102        --enable-swscale --enable-avfilter \
    109103        --enable-libmp3lame \
    110104        --enable-libvorbis \
    111105        --enable-libtheora \
    112106        --enable-libdirac --enable-libschroedinger \
    113         --enable-libfaac \
    114         --enable-libxvid \
    115         --enable-libx264 \
    116107        --enable-libvpx \
    117108        --enable-libspeex \
    118         --enable-nonfree \
    119109        --mandir=${prefix}/share/man \
    120110        --enable-shared --enable-pthreads \
    121111        --disable-indevs \
     112        --disable-mmx --disable-mmx2 --disable-sse --disable-ssse3 --disable-amd3dnow --disable-amd3dnowext \
    122113        --cc=${configure.cc}
    123114
    124115#add --enable-libopenjpeg when problems with openjpeg.h are resolved
     
    165156    }
    166157}
    167158
    168 variant no_mmx description {disable all x86 asm optimizations} {
    169     configure.args-append --disable-mmx --disable-mmx2 --disable-sse --disable-ssse3 --disable-amd3dnow --disable-amd3dnowext
     159variant mmx description {enable all x86 asm optimizations} {
     160    configure.args-delete  --disable-mmx --disable-mmx2 --disable-sse --disable-ssse3 --disable-amd3dnow --disable-amd3dnowext
    170161}
    171162
    172 variant no_gpl description {disallow use of GPL code, license will be LGPL} {
    173     configure.args-delete   --enable-gpl \
     163variant gpl description {allow use of GPL code, license will be GPL} {
     164    configure.args-append   --enable-gpl \
    174165                            --enable-postproc \
    175                             --enable-libfaad \
    176166                            --enable-libx264 \
    177                             --enable-libxvid
    178     depends_lib-delete      port:faad2 \
     167                            --enable-libxvid \
     168                            #--enable-libfaad
     169    depends_lib-append      port:faad2 \
    179170                            port:XviD
    180     depends_build-delete    port:x264
    181     license-delete          GPL-2+
     171    depends_build-append    port:x264
     172    license-append          GPL-2+
    182173}
    183174
    184 variant no_nonfree description {disallow use of nonfree code, libraries and binaries will be redistributable under GPL/LGPL} {
    185     configure.args-delete   --enable-nonfree \
     175variant nonfree description {allow use of nonfree code, libraries and binaries will not be redistributable} {
     176    configure.args-append   --enable-nonfree \
    186177                            --enable-libfaac
    187     depends_lib-delete      port:faac
    188     license-delete          nonfree
     178    depends_lib-append      port:faac
     179    license-append          nonfree
    189180}
    190181# the build server uses the default variants, and we want distributable binaries
    191 default_variants    +no_nonfree
     182default_variants    +gpl +mmx
    192183
    193184#
    194185# jack indev support is currently broken
     
    201192    depends_lib-append port:jack
    202193}
    203194
    204 if {![variant_isset no_nonfree]} {
     195if {[variant_isset nonfree]} {
    205196notes "
    206197*******
    207198******* This build of ${name} includes nonfree code as follows:
     
    217208*******     libavformat
    218209*******     libavutil
    219210*******
    220 ******* To remove this restriction use variant +no_nonfree
     211******* To remove this restriction use variant -nonfree
    221212*******
    222213"
    223 } elseif {![variant_isset no_gpl]} {
     214} elseif {[variant_isset gpl]} {
    224215notes "
    225216*******
    226217******* This build of ${name} includes GPLed code and
     
    233224*******      libx264
    234225*******      libxvid
    235226*******
    236 ******* To include only LGPLed code use variant +no_gpl +no_nonfree
     227******* To include only LGPLed code use variant -gpl -nonfree
    237228*******
    238229"
    239230} else {