| 1 | class LibdodoHg(CPackageRecipe): |
|---|
| 2 | |
|---|
| 3 | name = 'libdodo-hg' |
|---|
| 4 | version = '<version>' |
|---|
| 5 | |
|---|
| 6 | buildRequires = ['gcc-c++:runtime', 'autoconf:runtime', 'which:runtime', 'tcp_wrappers:devellib'] |
|---|
| 7 | |
|---|
| 8 | def setup(r): |
|---|
| 9 | r.addArchive('http://hg.libdodo.org/archive/%(version)s.tar.bz2') |
|---|
| 10 | |
|---|
| 11 | extraconfig = '' |
|---|
| 12 | |
|---|
| 13 | if Use.deque: |
|---|
| 14 | extraconfig +=' --enable-deque' |
|---|
| 15 | else: |
|---|
| 16 | extraconfig +=' --disable-deque' |
|---|
| 17 | |
|---|
| 18 | if Use.ioXexec: |
|---|
| 19 | extraconfig +=' --enable-io-xexec' |
|---|
| 20 | else: |
|---|
| 21 | extraconfig +=' --disable-io-xexec' |
|---|
| 22 | |
|---|
| 23 | if Use.graphicsXexec: |
|---|
| 24 | extraconfig +=' --enable-graphics-xexec' |
|---|
| 25 | else: |
|---|
| 26 | extraconfig +=' --disable-graphics-xexec' |
|---|
| 27 | |
|---|
| 28 | if Use.databaseXexec: |
|---|
| 29 | extraconfig +=' --enable-database-xexec' |
|---|
| 30 | else: |
|---|
| 31 | extraconfig +=' --disable-database-xexec' |
|---|
| 32 | |
|---|
| 33 | if Use.sqlite3: |
|---|
| 34 | r.buildRequires += ['sqlite:devel'] |
|---|
| 35 | extraconfig +=' --with-sqlite3' |
|---|
| 36 | |
|---|
| 37 | if Use.postgresql: |
|---|
| 38 | r.buildRequires += ['postgresql:devel'] |
|---|
| 39 | extraconfig +=' --with-postgresql' |
|---|
| 40 | |
|---|
| 41 | if Use.mysql: |
|---|
| 42 | r.buildRequires += ['mysql:devel'] |
|---|
| 43 | extraconfig +=' --with-mysql' |
|---|
| 44 | |
|---|
| 45 | if Use.ssl: |
|---|
| 46 | r.buildRequires += ['openssl:devel'] |
|---|
| 47 | extraconfig +=' --with-openssl' |
|---|
| 48 | |
|---|
| 49 | if Use.fastcgi: |
|---|
| 50 | r.buildRequires += ['fcgi:devel'] |
|---|
| 51 | extraconfig +=' --with-fast-cgi' |
|---|
| 52 | |
|---|
| 53 | if Use.pcre: |
|---|
| 54 | r.buildRequires += ['pcre:devel'] |
|---|
| 55 | extraconfig +=' --with-pcre' |
|---|
| 56 | |
|---|
| 57 | if Use.dl: |
|---|
| 58 | extraconfig +=' --with-dl' |
|---|
| 59 | |
|---|
| 60 | if Use.libxml2: |
|---|
| 61 | r.buildRequires += ['libxml2:devel'] |
|---|
| 62 | extraconfig +=' --with-libxml2' |
|---|
| 63 | |
|---|
| 64 | if Use.bzip2: |
|---|
| 65 | r.buildRequires += ['bzip2:devel'] |
|---|
| 66 | extraconfig +=' --with-bzip2' |
|---|
| 67 | |
|---|
| 68 | if Use.zlib: |
|---|
| 69 | r.buildRequires += ['zlib:devel'] |
|---|
| 70 | extraconfig +=' --with-zlib' |
|---|
| 71 | |
|---|
| 72 | if Use.iconv: |
|---|
| 73 | extraconfig +=' --with-iconv' |
|---|
| 74 | |
|---|
| 75 | if Use.imagemagick: |
|---|
| 76 | r.buildRequires += ['ImageMagick:devel'] |
|---|
| 77 | extraconfig +=' --with-imagemagick' |
|---|
| 78 | |
|---|
| 79 | if Use.ipcxsi: |
|---|
| 80 | extraconfig +=' --with-ipc=XSI' |
|---|
| 81 | |
|---|
| 82 | r.Replace('0.11.0', '%s' % r.version, 'trunk/configure.in') |
|---|
| 83 | r.Run('autoconf', dir='trunk') |
|---|
| 84 | |
|---|
| 85 | r.Configure(extraconfig, dir='trunk') |
|---|
| 86 | |
|---|
| 87 | r.Make(dir='trunk') |
|---|
| 88 | r.Make(dir='trunk/tests') |
|---|
| 89 | r.Install('trunk/libdodo.so.%(version)s','%(libdir)s/') |
|---|
| 90 | r.Symlink('%(libdir)s/libdodo.so.%(version)s','%(libdir)s/libdodo.so') |
|---|
| 91 | r.Install('trunk/include/','%(includedir)s/libdodo/') |
|---|