Opened 14 years ago

Closed 13 years ago

#24767 closed submission (fixed)

New port: thrift

Reported by: n0ts (Naoya Nakazawa) Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: kenny.macdermid@…, anatol (Anatol Pomozov), jendave@…
Port: thrift

Description

Apache Thrift http://incubator.apache.org/thrift/

I attach a Portfile

Attachments (5)

Portfile (3.1 KB) - added by n0ts (Naoya Nakazawa) 14 years ago.
Portfile for thrift
Portfile.2 (2.1 KB) - added by kenny@… 14 years ago.
Portfile.050 (2.3 KB) - added by anatol (Anatol Pomozov) 14 years ago.
Portfile fot Thrift 0.5.0
Portfile.050.2 (2.7 KB) - added by kangas@… 13 years ago.
Improved version of Anatol's Portfile.050
Portfile.060 (2.6 KB) - added by kenny.macdermid@… 13 years ago.
Portfile for 0.6.0

Download all attachments as: .zip

Change History (26)

comment:1 Changed 14 years ago by ryandesign (Ryan Carsten Schmidt)

There are a lot of variants. Could we eliminate some of these, for example by making some of them always-on, like maybe the ones that don't have any additional dependencies?

Could the python variant use python26 instead of python24?

comment:2 in reply to:  1 Changed 14 years ago by n0ts (Naoya Nakazawa)

Replying to ryandesign@…:

There are a lot of variants. Could we eliminate some of these, for example by making some of them always-on, like maybe the ones that don't have any additional dependencies?

Apache Thrift is supported a lot of language. I think that enough support java, python, ruby, perl, and when all support alyways-on compile time is too long...

Could the python variant use python26 instead of python24?

OK.

I attached a new Portfile.

Changed 14 years ago by n0ts (Naoya Nakazawa)

Attachment: Portfile added

Portfile for thrift

comment:3 Changed 14 years ago by ryandesign (Ryan Carsten Schmidt)

I mean the variants cocoa, html, hs, ocaml, st and xsd. They don't list any dependencies. I compiled the port once without those variants and once with, keeping track of how long it took (using time) and how much disk space the installed files occupy (using du). With your default variants, it took 3 minutes 40 seconds and 5.2MB of disk; adding in these additional variants, it took 4 minutes 12 seconds and 5.7MB of disk. So it doesn't take much more time or disk space to just remove these variants and build their functionality straight into the port, so I would recommend that since it would simplify the port and remove the need for some user choices.

Unless these variants should actually have dependencies and you just haven't listed them. For example, does the ocaml variant require a dependency on the ocaml port? It seems to build without ocaml installed, so maybe not.

Some more notes:

The port installed /usr/local/lib/libthrift.jar, which violates the mtree. (Everything should be installed somewhere within ${prefix}.)

The configure script says "configure: WARNING: unrecognized options: --with-python"

You don't need to say "use_bzip2 no"; that's the default.

You're missing the long_description keyword (see "port lint"), and your description is rather long. So probably the description you have now should become the long_description and you should write a new shorter string for the description.

The perl dependency in the perl variant should be written "path:bin/perl:perl5" as it is in other ports (not "port:perl5").

The php dependency in the php variant should be written "path:bin/php:php5" as it is in other ports (not "port:php5").

I'm confused by the java variant. It adds the configure arg "--enable-gen-java=yes" but "--enable-gen-java" is already in the port's global configure args which is the same thing, isn't it? Should the port's global configure args use "--enable-gen-java=no" instead?

Changed 14 years ago by kenny@…

Attachment: Portfile.2 added

comment:4 Changed 14 years ago by kenny@…

New portfile supports thrift 0.4.0.

I also took care of some of the issues. It now builds with all generators, as the tests fail if to you don't. The libraries to build are still configurable.

/usr/local/lib/libthrift.jar is likely still installed in the wrong place, as I didn't look at that issue.

I built using -perl -rb, so YMMV.

comment:5 Changed 14 years ago by kenny.macdermid@…

Cc: kenny.macdermid@… added

Cc Me!

comment:6 Changed 14 years ago by n0ts (Naoya Nakazawa)

Thanks for all comments. I think that thrift portfile separate, like thrift-php and thrift-python etc... Is this good thing?

comment:7 Changed 14 years ago by anatol (Anatol Pomozov)

Cc: anatol.pomozov@… added

Cc Me!

comment:8 Changed 14 years ago by anatol (Anatol Pomozov)

Is any chance to see Thrift as a macport? I think that this library is useful and it would be great to see it as a part of my favorite macosx package manager.

Can you please update it to Thrift 0.4.0? (or wait until 0.5.0 - it should be released very soon).

comment:9 Changed 14 years ago by anatol (Anatol Pomozov)

Oops my bad. Patchfile #2 is for Thrift 0.4.0

comment:10 Changed 14 years ago by anatol (Anatol Pomozov)

comment:11 Changed 14 years ago by anatol (Anatol Pomozov)

Is any chance to see Thrift in macports? I think it will be useful for one who develops apps with Thrift.

Changed 14 years ago by anatol (Anatol Pomozov)

Attachment: Portfile.050 added

Portfile fot Thrift 0.5.0

comment:12 Changed 14 years ago by anatol (Anatol Pomozov)

Updated Portfile for 0.5.0

comment:13 Changed 14 years ago by anatol (Anatol Pomozov)

Forgot to mention: I also added a variant for Haskell (disabled by default)

comment:14 Changed 14 years ago by anatol (Anatol Pomozov)

The patch generates following warnings. I am not sure what should I do with it. Does anyone has any pointers?

dhcp-172-19-29-126:thrift anatol$ sudo port install thrift -java -perl -rb ---> Computing dependencies for thrift ---> Fetching thrift ---> Verifying checksum(s) for thrift ---> Extracting thrift ---> Configuring thrift ---> Building thrift ---> Staging thrift into destroot Warning: violation by /etc Warning: violation by /usr Warning: thrift violates the layout of the ports-filesystems! Warning: Please fix or indicate this misbehavior (if it is intended), it will be an error in future releases!

comment:15 Changed 14 years ago by anatol (Anatol Pomozov)

Sorry this is a formatted log

$ sudo port install thrift -java -perl -rb
--->  Computing dependencies for thrift
--->  Fetching thrift
--->  Verifying checksum(s) for thrift
--->  Extracting thrift
--->  Configuring thrift
--->  Building thrift
--->  Staging thrift into destroot
Warning: violation by /etc
Warning: violation by /usr
Warning: thrift violates the layout of the ports-filesystems!
Warning: Please fix or indicate this misbehavior (if it is intended), it will be an error in future releases!

comment:16 in reply to:  15 Changed 14 years ago by akitada@…

Replying to anatol.pomozov@…:

Sorry this is a formatted log

$ sudo port install thrift -java -perl -rb
--->  Computing dependencies for thrift
--->  Fetching thrift
--->  Verifying checksum(s) for thrift
--->  Extracting thrift
--->  Configuring thrift
--->  Building thrift
--->  Staging thrift into destroot
Warning: violation by /etc
Warning: violation by /usr
Warning: thrift violates the layout of the ports-filesystems!
Warning: Please fix or indicate this misbehavior (if it is intended), it will be an error in future releases!

It looks like thrift port installs /etc/php.d/thrift_protocol.ini and /usr/lib/python2.6/site-packages/thrift. For Python module, you need to use PY_PREFIX to change the installation path. Others have similar ones. Please consult ./configure -h output and README.

comment:17 Changed 14 years ago by anatol (Anatol Pomozov)

I set following envvars

configure.env PHP_PREFIX=${destroot}/lib/php PHP_CONFIG_PREFIX=${destroot}/etc/php.d

for PHP and following for Python

configure.env PY_PREFIX=${destroot}

But I still have the warning

comment:18 Changed 13 years ago by jendave@…

Cc: jendave@… added

Cc Me!

Changed 13 years ago by kangas@…

Attachment: Portfile.050.2 added

Improved version of Anatol's Portfile.050

comment:19 Changed 13 years ago by kangas@…

Anatol, I attached an improved version of your "Portfile.050". You cannot have multiple 'configure.env' statements -- they will overwrite one another. Instead, you want this:

configure.env-append    JAVA_PREFIX=${prefix}/share/java
configure.env-append    PERL_PREFIX=${prefix}
configure.env-append    PHP_PREFIX=${prefix}/lib/php
configure.env-append    PY_PREFIX=${prefix}/Library/Frameworks/Python.framework/Versions/2.6

comment:20 Changed 13 years ago by anatol (Anatol Pomozov)

Great thank you.

I would really love to see thrift port in macports. Thrift is a great library and many people may find it useful. And BTW Thrift is going to be added to Debian repo soon.

Changed 13 years ago by kenny.macdermid@…

Attachment: Portfile.060 added

Portfile for 0.6.0

comment:21 Changed 13 years ago by jmroot (Joshua Root)

Resolution: fixed
Status: newclosed

Committed in r78945 with these changes:

  • removed the distname and worksrcdir lines that were just setting the default values
  • used apache mirror group
  • moved configure.env settings into the variants that need them
  • used $frameworks_dir when setting PY_PREFIX
  • renamed some variants to match the names used by most other ports
  • disabled ruby variant for the time being because it installs files straight to their final destination, bypassing the destroot and preventing macports from registering them
Note: See TracTickets for help on using tickets.