| 37 | |
| 38 | variant contrib description "Include org-mode contributed packages" { |
| 39 | } |
| 40 | |
| 41 | set org_mode_emacs_binary "${applications_dir}/Emacs.app/Contents/MacOS/Emacs" |
| 42 | if {![file exists $org_mode_emacs_binary] || |
| 43 | [registry_file_registered $org_mode_emacs_binary] == 0} { |
| 44 | set org_mode_emacs_binary "${prefix}/bin/emacs" |
| 45 | } |
| 46 | |
| 47 | configure { |
| 48 | system "cd ${worksrcpath} && make local.mk" |
| 49 | reinplace "s|EMACS = emacs|EMACS = ${org_mode_emacs_binary}|g" ${worksrcpath}/local.mk |
| 50 | |
| 51 | if { [ variant_isset contrib ] } { |
| 52 | # Add definition of ORG_ADD_CONTRIB. This definition includes |
| 53 | # almost all of the contrib modules (a simple '*' would do |
| 54 | # all); we do not include org-jira, because it has a |
| 55 | # build-time dependency on jira.el, which is not currently |
| 56 | # available via MacPorts. |
| 57 | system "echo \"ORG_ADD_CONTRIB =\" >> ${worksrcpath}/local.mk" |
| 58 | system "echo \"ORG_ADD_CONTRIB += htmlize\" >> ${worksrcpath}/local.mk" |
| 59 | system "echo \"ORG_ADD_CONTRIB += org2rem\" >> ${worksrcpath}/local.mk" |
| 60 | system "echo \"ORG_ADD_CONTRIB += org-a*\" >> ${worksrcpath}/local.mk" |
| 61 | system "echo \"ORG_ADD_CONTRIB += org-b*\" >> ${worksrcpath}/local.mk" |
| 62 | system "echo \"ORG_ADD_CONTRIB += org-c*\" >> ${worksrcpath}/local.mk" |
| 63 | system "echo \"ORG_ADD_CONTRIB += org-d*\" >> ${worksrcpath}/local.mk" |
| 64 | system "echo \"ORG_ADD_CONTRIB += org-e*\" >> ${worksrcpath}/local.mk" |
| 65 | system "echo \"ORG_ADD_CONTRIB += org-g*\" >> ${worksrcpath}/local.mk" |
| 66 | system "echo \"ORG_ADD_CONTRIB += org-i*\" >> ${worksrcpath}/local.mk" |
| 67 | system "echo \"ORG_ADD_CONTRIB += org-l*\" >> ${worksrcpath}/local.mk" |
| 68 | system "echo \"ORG_ADD_CONTRIB += org-m*\" >> ${worksrcpath}/local.mk" |
| 69 | system "echo \"ORG_ADD_CONTRIB += org-n*\" >> ${worksrcpath}/local.mk" |
| 70 | system "echo \"ORG_ADD_CONTRIB += org-p*\" >> ${worksrcpath}/local.mk" |
| 71 | system "echo \"ORG_ADD_CONTRIB += org-r*\" >> ${worksrcpath}/local.mk" |
| 72 | system "echo \"ORG_ADD_CONTRIB += org-s*\" >> ${worksrcpath}/local.mk" |
| 73 | system "echo \"ORG_ADD_CONTRIB += org-t*\" >> ${worksrcpath}/local.mk" |
| 74 | system "echo \"ORG_ADD_CONTRIB += org-v*\" >> ${worksrcpath}/local.mk" |
| 75 | system "echo \"ORG_ADD_CONTRIB += org-w*\" >> ${worksrcpath}/local.mk" |
| 76 | system "echo \"ORG_ADD_CONTRIB += orgtbl-sqlinsert\" >> ${worksrcpath}/local.mk" |
| 77 | } |
| 78 | } |