summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /www-apache
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'www-apache')
-rw-r--r--www-apache/anyterm/Manifest1
-rw-r--r--www-apache/anyterm/anyterm-1.1.29.ebuild46
-rw-r--r--www-apache/anyterm/files/anyterm-1.1.28-respect-LDFLAGS.patch26
-rw-r--r--www-apache/anyterm/files/anyterm-1.1.29-boost-1.50.patch58
-rw-r--r--www-apache/anyterm/files/anyterm-1.1.29-gcc-4.4.patch10
-rw-r--r--www-apache/anyterm/files/anyterm.conf.d7
-rw-r--r--www-apache/anyterm/files/anyterm.init.d21
-rw-r--r--www-apache/anyterm/metadata.xml5
-rw-r--r--www-apache/libapreq2/Manifest1
-rw-r--r--www-apache/libapreq2/files/76_mod_apreq.conf13
-rw-r--r--www-apache/libapreq2/files/libapreq2-2.08-doc.patch24
-rw-r--r--www-apache/libapreq2/libapreq2-2.13-r1.ebuild64
-rw-r--r--www-apache/libapreq2/metadata.xml5
-rw-r--r--www-apache/metadata.xml39
-rw-r--r--www-apache/mod-auth-mysql/Manifest2
-rw-r--r--www-apache/mod-auth-mysql/files/12_mod_auth_mysql.conf132
-rw-r--r--www-apache/mod-auth-mysql/metadata.xml5
-rw-r--r--www-apache/mod-auth-mysql/mod-auth-mysql-4.3.9-r1.ebuild60
-rw-r--r--www-apache/mod_access_dnsbl/Manifest1
-rw-r--r--www-apache/mod_access_dnsbl/files/10_mod_access_dnsbl.conf11
-rw-r--r--www-apache/mod_access_dnsbl/metadata.xml5
-rw-r--r--www-apache/mod_access_dnsbl/mod_access_dnsbl-0.02.ebuild24
-rw-r--r--www-apache/mod_anonymize_ip/Manifest1
-rw-r--r--www-apache/mod_anonymize_ip/files/20_mod_anonymize_ip.conf6
-rw-r--r--www-apache/mod_anonymize_ip/metadata.xml10
-rw-r--r--www-apache/mod_anonymize_ip/mod_anonymize_ip-0.3.1.ebuild30
-rw-r--r--www-apache/mod_auth_cookie_mysql2/Manifest1
-rw-r--r--www-apache/mod_auth_cookie_mysql2/files/55_mod_auth_cookie_mysql2.conf95
-rw-r--r--www-apache/mod_auth_cookie_mysql2/metadata.xml7
-rw-r--r--www-apache/mod_auth_cookie_mysql2/mod_auth_cookie_mysql2-1.0.ebuild29
-rw-r--r--www-apache/mod_auth_imap2/Manifest1
-rw-r--r--www-apache/mod_auth_imap2/files/10_mod_auth_imap.conf36
-rw-r--r--www-apache/mod_auth_imap2/metadata.xml5
-rw-r--r--www-apache/mod_auth_imap2/mod_auth_imap2-2.2.0.ebuild28
-rw-r--r--www-apache/mod_auth_kerb/Manifest2
-rw-r--r--www-apache/mod_auth_kerb/files/11_mod_auth_kerb.conf14
-rw-r--r--www-apache/mod_auth_kerb/files/mod_auth_kerb-5.4-cachedir.patch15
-rw-r--r--www-apache/mod_auth_kerb/files/mod_auth_kerb-5.4-delegation.patch68
-rw-r--r--www-apache/mod_auth_kerb/files/mod_auth_kerb-5.4-fixes.patch40
-rw-r--r--www-apache/mod_auth_kerb/files/mod_auth_kerb-5.4-handle-continue.patch20
-rw-r--r--www-apache/mod_auth_kerb/files/mod_auth_kerb-5.4-httpd24.patch75
-rw-r--r--www-apache/mod_auth_kerb/files/mod_auth_kerb-5.4-longuser.patch31
-rw-r--r--www-apache/mod_auth_kerb/files/mod_auth_kerb-5.4-rcopshack.patch73
-rw-r--r--www-apache/mod_auth_kerb/files/mod_auth_kerb-5.4-s4u2proxy-r3.patch603
-rw-r--r--www-apache/mod_auth_kerb/files/mod_auth_kerb-5.4-s4u2proxy.patch591
-rw-r--r--www-apache/mod_auth_kerb/files/mod_auth_kerb.conf1
-rw-r--r--www-apache/mod_auth_kerb/metadata.xml10
-rw-r--r--www-apache/mod_auth_kerb/mod_auth_kerb-5.3.ebuild29
-rw-r--r--www-apache/mod_auth_kerb/mod_auth_kerb-5.4-r2.ebuild49
-rw-r--r--www-apache/mod_auth_mysql/Manifest1
-rw-r--r--www-apache/mod_auth_mysql/files/12_mod_auth_mysql.conf132
-rw-r--r--www-apache/mod_auth_mysql/files/mod_auth_mysql-3.0.0-apache-2.2.patch131
-rw-r--r--www-apache/mod_auth_mysql/files/mod_auth_mysql-3.0.0-htpasswd2-auth-style.patch35
-rw-r--r--www-apache/mod_auth_mysql/metadata.xml8
-rw-r--r--www-apache/mod_auth_mysql/mod_auth_mysql-3.0.0-r3.ebuild34
-rw-r--r--www-apache/mod_auth_nufw/Manifest1
-rw-r--r--www-apache/mod_auth_nufw/files/50_mod_auth_nufw.conf5
-rw-r--r--www-apache/mod_auth_nufw/metadata.xml8
-rw-r--r--www-apache/mod_auth_nufw/mod_auth_nufw-2.2.2.ebuild48
-rw-r--r--www-apache/mod_auth_openid/Manifest1
-rw-r--r--www-apache/mod_auth_openid/files/10_mod_auth_openid.conf5
-rw-r--r--www-apache/mod_auth_openid/metadata.xml10
-rw-r--r--www-apache/mod_auth_openid/mod_auth_openid-0.8.ebuild39
-rw-r--r--www-apache/mod_auth_pgsql/Manifest1
-rw-r--r--www-apache/mod_auth_pgsql/files/80_mod_auth_pgsql.conf9
-rw-r--r--www-apache/mod_auth_pgsql/files/mod_auth_pgsql-2.0.3-apache-2.4.patch341
-rw-r--r--www-apache/mod_auth_pgsql/files/mod_auth_pgsql-2.0.3-documentation.patch124
-rw-r--r--www-apache/mod_auth_pgsql/files/mod_auth_pgsql-2.0.3-encoding.patch283
-rw-r--r--www-apache/mod_auth_pgsql/files/mod_auth_pgsql-2.0.3-fixdoublefree.patch87
-rw-r--r--www-apache/mod_auth_pgsql/metadata.xml5
-rw-r--r--www-apache/mod_auth_pgsql/mod_auth_pgsql-2.0.3-r1.ebuild31
-rw-r--r--www-apache/mod_auth_pgsql/mod_auth_pgsql-2.0.3-r2.ebuild40
-rw-r--r--www-apache/mod_auth_radius/Manifest1
-rw-r--r--www-apache/mod_auth_radius/files/1.5.8-includes.patch25
-rw-r--r--www-apache/mod_auth_radius/files/1.5.8-remote_ip-obsolete.patch21
-rw-r--r--www-apache/mod_auth_radius/metadata.xml8
-rw-r--r--www-apache/mod_auth_radius/mod_auth_radius-1.5.8.ebuild40
-rw-r--r--www-apache/mod_auth_tkt/Manifest1
-rw-r--r--www-apache/mod_auth_tkt/files/10_mod_auth_tkt.conf24
-rw-r--r--www-apache/mod_auth_tkt/files/mod_auth_tkt-2.1.0-apache-2.4.patch40
-rw-r--r--www-apache/mod_auth_tkt/metadata.xml5
-rw-r--r--www-apache/mod_auth_tkt/mod_auth_tkt-2.1.0-r1.ebuild53
-rw-r--r--www-apache/mod_auth_token/Manifest1
-rw-r--r--www-apache/mod_auth_token/files/75_mod_auth_token.conf26
-rw-r--r--www-apache/mod_auth_token/files/mod_auth_token-1.0.6_beta-ap_pstrcat.patch13
-rw-r--r--www-apache/mod_auth_token/metadata.xml15
-rw-r--r--www-apache/mod_auth_token/mod_auth_token-1.0.6_beta.ebuild47
-rw-r--r--www-apache/mod_auth_xradius/Manifest1
-rw-r--r--www-apache/mod_auth_xradius/files/0.4.6-apache24-api-changes.diff14
-rw-r--r--www-apache/mod_auth_xradius/files/0.4.6-fallback-support.diff31
-rw-r--r--www-apache/mod_auth_xradius/files/0.4.6-obsolete-autotools-syntax.diff19
-rw-r--r--www-apache/mod_auth_xradius/metadata.xml8
-rw-r--r--www-apache/mod_auth_xradius/mod_auth_xradius-0.4.6-r1.ebuild28
-rw-r--r--www-apache/mod_auth_xradius/mod_auth_xradius-0.4.6.ebuild26
-rw-r--r--www-apache/mod_authn_sasl/Manifest1
-rw-r--r--www-apache/mod_authn_sasl/files/10_mod_authn_sasl.conf5
-rw-r--r--www-apache/mod_authn_sasl/metadata.xml5
-rw-r--r--www-apache/mod_authn_sasl/mod_authn_sasl-1.2.ebuild27
-rw-r--r--www-apache/mod_authnz_external/Manifest2
-rw-r--r--www-apache/mod_authnz_external/files/10_mod_authnz_external.conf34
-rw-r--r--www-apache/mod_authnz_external/metadata.xml8
-rw-r--r--www-apache/mod_authnz_external/mod_authnz_external-3.2.6.ebuild24
-rw-r--r--www-apache/mod_authnz_external/mod_authnz_external-3.3.2.ebuild21
-rw-r--r--www-apache/mod_authnz_persona/Manifest1
-rw-r--r--www-apache/mod_authnz_persona/files/70_mod_authnz_persona.conf3
-rw-r--r--www-apache/mod_authnz_persona/metadata.xml11
-rw-r--r--www-apache/mod_authnz_persona/mod_authnz_persona-0.8.1.ebuild32
-rw-r--r--www-apache/mod_backtrace/Manifest1
-rw-r--r--www-apache/mod_backtrace/files/10_mod_backtrace.conf4
-rw-r--r--www-apache/mod_backtrace/metadata.xml11
-rw-r--r--www-apache/mod_backtrace/mod_backtrace-2.01.ebuild36
-rw-r--r--www-apache/mod_bw/Manifest1
-rw-r--r--www-apache/mod_bw/files/11_mod_bw.conf16
-rw-r--r--www-apache/mod_bw/files/mod_bw-0.9.2-apache24.patch49
-rw-r--r--www-apache/mod_bw/metadata.xml5
-rw-r--r--www-apache/mod_bw/mod_bw-0.9.2-r1.ebuild30
-rw-r--r--www-apache/mod_caucho/Manifest2
-rw-r--r--www-apache/mod_caucho/files/88_mod_caucho.conf21
-rw-r--r--www-apache/mod_caucho/metadata.xml5
-rw-r--r--www-apache/mod_caucho/mod_caucho-4.0.26-r1.ebuild53
-rw-r--r--www-apache/mod_caucho/mod_caucho-4.0.26.ebuild48
-rw-r--r--www-apache/mod_cband/Manifest1
-rw-r--r--www-apache/mod_cband/files/10_mod_cband.conf37
-rw-r--r--www-apache/mod_cband/metadata.xml7
-rw-r--r--www-apache/mod_cband/mod_cband-0.9.7.5.ebuild31
-rw-r--r--www-apache/mod_common_redirect/Manifest1
-rw-r--r--www-apache/mod_common_redirect/files/20_mod_common_redirect.conf5
-rw-r--r--www-apache/mod_common_redirect/metadata.xml10
-rw-r--r--www-apache/mod_common_redirect/mod_common_redirect-0.1.1.ebuild30
-rw-r--r--www-apache/mod_depends/Manifest1
-rw-r--r--www-apache/mod_depends/files/0.7/09_mod_depends.conf5
-rw-r--r--www-apache/mod_depends/metadata.xml5
-rw-r--r--www-apache/mod_depends/mod_depends-0.7.0_p200702041.ebuild37
-rw-r--r--www-apache/mod_diagnostics/Manifest1
-rw-r--r--www-apache/mod_diagnostics/files/20_mod_diagnostics.conf5
-rw-r--r--www-apache/mod_diagnostics/metadata.xml5
-rw-r--r--www-apache/mod_diagnostics/mod_diagnostics-0.0.1.ebuild27
-rw-r--r--www-apache/mod_dnsbl_lookup/Manifest1
-rw-r--r--www-apache/mod_dnsbl_lookup/files/09_mod_dnsbl_lookup.conf7
-rw-r--r--www-apache/mod_dnsbl_lookup/metadata.xml5
-rw-r--r--www-apache/mod_dnsbl_lookup/mod_dnsbl_lookup-0.91.ebuild29
-rw-r--r--www-apache/mod_dnssd/Manifest1
-rw-r--r--www-apache/mod_dnssd/files/80_mod_dnssd.conf6
-rw-r--r--www-apache/mod_dnssd/files/mod_dnssd-0.6-httpd24.patch24
-rw-r--r--www-apache/mod_dnssd/files/mod_dnssd-0.6-ldflags.patch22
-rw-r--r--www-apache/mod_dnssd/metadata.xml5
-rw-r--r--www-apache/mod_dnssd/mod_dnssd-0.6-r1.ebuild40
-rw-r--r--www-apache/mod_evasive/Manifest1
-rw-r--r--www-apache/mod_evasive/files/10_mod_evasive.conf31
-rw-r--r--www-apache/mod_evasive/metadata.xml5
-rw-r--r--www-apache/mod_evasive/mod_evasive-1.10.1-r1.ebuild38
-rw-r--r--www-apache/mod_extract_forwarded/Manifest2
-rw-r--r--www-apache/mod_extract_forwarded/files/98_mod_extract_forwarded.conf9
-rw-r--r--www-apache/mod_extract_forwarded/metadata.xml8
-rw-r--r--www-apache/mod_extract_forwarded/mod_extract_forwarded-2.0.2.ebuild32
-rw-r--r--www-apache/mod_extract_forwarded/mod_extract_forwarded-2.0.3_pre2015052015.ebuild30
-rw-r--r--www-apache/mod_fastcgi/Manifest1
-rw-r--r--www-apache/mod_fastcgi/files/20_mod_fastcgi.conf6
-rw-r--r--www-apache/mod_fastcgi/files/mod_fastcgi-compile-against-apache2.4.patch137
-rw-r--r--www-apache/mod_fastcgi/metadata.xml8
-rw-r--r--www-apache/mod_fastcgi/mod_fastcgi-2.4.7_pre0910052141-r1.ebuild30
-rw-r--r--www-apache/mod_fastcgi/mod_fastcgi-2.4.7_pre0910052141.ebuild26
-rw-r--r--www-apache/mod_fastcgi_handler/Manifest1
-rw-r--r--www-apache/mod_fastcgi_handler/files/20_mod_fastcgi_handler.conf5
-rw-r--r--www-apache/mod_fastcgi_handler/metadata.xml11
-rw-r--r--www-apache/mod_fastcgi_handler/mod_fastcgi_handler-0.6.ebuild32
-rw-r--r--www-apache/mod_fcgid/Manifest1
-rw-r--r--www-apache/mod_fcgid/files/2.2/20_mod_fcgid.conf7
-rw-r--r--www-apache/mod_fcgid/metadata.xml12
-rw-r--r--www-apache/mod_fcgid/mod_fcgid-2.3.9-r1.ebuild31
-rw-r--r--www-apache/mod_fcgid/mod_fcgid-2.3.9.ebuild27
-rw-r--r--www-apache/mod_flvx/Manifest1
-rw-r--r--www-apache/mod_flvx/files/20_mod_flvx.conf11
-rw-r--r--www-apache/mod_flvx/metadata.xml5
-rw-r--r--www-apache/mod_flvx/mod_flvx-0.0.1-r1.ebuild22
-rw-r--r--www-apache/mod_ftpd/Manifest1
-rw-r--r--www-apache/mod_ftpd/files/0.14-r1/45_mod_ftpd.conf51
-rw-r--r--www-apache/mod_ftpd/metadata.xml5
-rw-r--r--www-apache/mod_ftpd/mod_ftpd-0.14-r1.ebuild48
-rw-r--r--www-apache/mod_geoip2/Manifest1
-rw-r--r--www-apache/mod_geoip2/files/30_mod_geoip2.conf5
-rw-r--r--www-apache/mod_geoip2/files/mod_geoip2-1.2.7-httpd24.patch35
-rw-r--r--www-apache/mod_geoip2/metadata.xml5
-rw-r--r--www-apache/mod_geoip2/mod_geoip2-1.2.7-r1.ebuild36
-rw-r--r--www-apache/mod_gnutls/Manifest2
-rw-r--r--www-apache/mod_gnutls/files/47_mod_gnutls.conf30
-rw-r--r--www-apache/mod_gnutls/files/mod_gnutls-0.5.10-httpd24.patch18
-rw-r--r--www-apache/mod_gnutls/files/mod_gnutls-0.5.10-no-extra.patch11
-rw-r--r--www-apache/mod_gnutls/files/mod_gnutls_apr_memcache_m4_dirty.patch31
-rw-r--r--www-apache/mod_gnutls/metadata.xml8
-rw-r--r--www-apache/mod_gnutls/mod_gnutls-0.5.10-r1.ebuild50
-rw-r--r--www-apache/mod_gnutls/mod_gnutls-0.6.ebuild48
-rw-r--r--www-apache/mod_h2/Manifest13
-rw-r--r--www-apache/mod_h2/files/mod_h2.conf8
-rw-r--r--www-apache/mod_h2/metadata.xml10
-rw-r--r--www-apache/mod_h2/mod_h2-0.6.0.ebuild46
-rw-r--r--www-apache/mod_h2/mod_h2-0.6.1.ebuild47
-rw-r--r--www-apache/mod_h2/mod_h2-0.6.2.ebuild47
-rw-r--r--www-apache/mod_h2/mod_h2-0.6.3.ebuild47
-rw-r--r--www-apache/mod_h2/mod_h2-0.6.4.ebuild57
-rw-r--r--www-apache/mod_h2/mod_h2-0.6.5.ebuild57
-rw-r--r--www-apache/mod_h2/mod_h2-0.6.6.ebuild57
-rw-r--r--www-apache/mod_h2/mod_h2-0.7.0.ebuild57
-rw-r--r--www-apache/mod_h2/mod_h2-0.7.2.ebuild57
-rw-r--r--www-apache/mod_h2/mod_h2-0.7.3.ebuild47
-rw-r--r--www-apache/mod_h2/mod_h2-0.8.0.ebuild47
-rw-r--r--www-apache/mod_h2/mod_h2-0.8.1.ebuild47
-rw-r--r--www-apache/mod_h2/mod_h2-0.8.2.ebuild47
-rw-r--r--www-apache/mod_h2/mod_h2-9999.ebuild47
-rw-r--r--www-apache/mod_jk/Manifest2
-rw-r--r--www-apache/mod_jk/files/88_mod_jk.conf160
-rw-r--r--www-apache/mod_jk/files/jk-workers.properties36
-rw-r--r--www-apache/mod_jk/metadata.xml16
-rw-r--r--www-apache/mod_jk/mod_jk-1.2.37.ebuild75
-rw-r--r--www-apache/mod_jk/mod_jk-1.2.40.ebuild66
-rw-r--r--www-apache/mod_layout/Manifest1
-rw-r--r--www-apache/mod_layout/files/15_mod_layout.conf148
-rw-r--r--www-apache/mod_layout/metadata.xml5
-rw-r--r--www-apache/mod_layout/mod_layout-5.1.ebuild26
-rw-r--r--www-apache/mod_ldap_userdir/Manifest1
-rw-r--r--www-apache/mod_ldap_userdir/files/47_mod_ldap_userdir.conf9
-rw-r--r--www-apache/mod_ldap_userdir/metadata.xml5
-rw-r--r--www-apache/mod_ldap_userdir/mod_ldap_userdir-1.1.19.ebuild34
-rw-r--r--www-apache/mod_limitipconn/Manifest1
-rw-r--r--www-apache/mod_limitipconn/files/27_mod_limitipconn.conf20
-rw-r--r--www-apache/mod_limitipconn/metadata.xml13
-rw-r--r--www-apache/mod_limitipconn/mod_limitipconn-0.24.ebuild26
-rw-r--r--www-apache/mod_loadavg/Manifest1
-rw-r--r--www-apache/mod_loadavg/files/10_mod_loadavg.conf18
-rw-r--r--www-apache/mod_loadavg/metadata.xml5
-rw-r--r--www-apache/mod_loadavg/mod_loadavg-0.0.1.ebuild27
-rw-r--r--www-apache/mod_log_rotate/Manifest2
-rw-r--r--www-apache/mod_log_rotate/files/10_mod_log_rotate.conf6
-rw-r--r--www-apache/mod_log_rotate/metadata.xml10
-rw-r--r--www-apache/mod_log_rotate/mod_log_rotate-1.00.ebuild22
-rw-r--r--www-apache/mod_log_rotate/mod_log_rotate-1.01.ebuild25
-rw-r--r--www-apache/mod_log_sql/Manifest1
-rw-r--r--www-apache/mod_log_sql/files/1.101/42_mod_log_sql.conf33
-rw-r--r--www-apache/mod_log_sql/files/42_mod_log_sql.conf28
-rw-r--r--www-apache/mod_log_sql/files/mod_log_sql-1.101-apache-2.4.patch17
-rw-r--r--www-apache/mod_log_sql/metadata.xml5
-rw-r--r--www-apache/mod_log_sql/mod_log_sql-1.101-r1.ebuild50
-rw-r--r--www-apache/mod_log_sql/mod_log_sql-1.101-r2.ebuild62
-rw-r--r--www-apache/mod_macro/Manifest2
-rw-r--r--www-apache/mod_macro/files/00_example.conf26
-rw-r--r--www-apache/mod_macro/files/27_mod_macro.conf6
-rw-r--r--www-apache/mod_macro/metadata.xml5
-rw-r--r--www-apache/mod_macro/mod_macro-1.1.10.ebuild31
-rw-r--r--www-apache/mod_macro/mod_macro-1.2.1.ebuild32
-rw-r--r--www-apache/mod_mono/Manifest1
-rw-r--r--www-apache/mod_mono/files/2.2/70_mod_mono.conf88
-rw-r--r--www-apache/mod_mono/files/mod_mono-2.10-apache-2.4.patch146
-rw-r--r--www-apache/mod_mono/metadata.xml10
-rw-r--r--www-apache/mod_mono/mod_mono-2.10.ebuild64
-rw-r--r--www-apache/mod_musicindex/Manifest4
-rw-r--r--www-apache/mod_musicindex/files/50_mod_musicindex.conf5
-rw-r--r--www-apache/mod_musicindex/metadata.xml10
-rw-r--r--www-apache/mod_musicindex/mod_musicindex-1.4.1.ebuild60
-rw-r--r--www-apache/mod_nss/Manifest1
-rw-r--r--www-apache/mod_nss/files/47_mod_nss.conf224
-rw-r--r--www-apache/mod_nss/metadata.xml10
-rw-r--r--www-apache/mod_nss/mod_nss-1.0.11.ebuild59
-rw-r--r--www-apache/mod_pcgi2/Manifest1
-rw-r--r--www-apache/mod_pcgi2/files/20_mod_pcgi.conf8
-rw-r--r--www-apache/mod_pcgi2/metadata.xml5
-rw-r--r--www-apache/mod_pcgi2/mod_pcgi2-2.0.2.ebuild28
-rw-r--r--www-apache/mod_perl/Manifest1
-rw-r--r--www-apache/mod_perl/files/2.0.3/75_mod_perl.2.2.conf50
-rw-r--r--www-apache/mod_perl/files/2.0.3/75_mod_perl.conf54
-rw-r--r--www-apache/mod_perl/files/2.0.3/apache2-mod_perl-startup.pl24
-rw-r--r--www-apache/mod_perl/files/mod_perl-2.0.1-sneak-tmpdir.patch11
-rw-r--r--www-apache/mod_perl/files/mod_perl-2.0.4-inline.patch22
-rw-r--r--www-apache/mod_perl/files/mod_perl-2.0.7-bundled-Apache-Test.patch134
-rw-r--r--www-apache/mod_perl/files/mod_perl-2.0.8-bundled-Apache-Test.patch127
-rw-r--r--www-apache/mod_perl/files/use-client_ip-client_add-instead-of-remote_ip-remote.patch47
-rw-r--r--www-apache/mod_perl/files/use-log.level-instead-of-loglevel.patch27
-rw-r--r--www-apache/mod_perl/metadata.xml9
-rw-r--r--www-apache/mod_perl/mod_perl-2.0.8-r1.ebuild162
-rw-r--r--www-apache/mod_perl/mod_perl-2.0.8-r2.ebuild162
-rw-r--r--www-apache/mod_perl/mod_perl-2.0.8.ebuild157
-rw-r--r--www-apache/mod_proxy_fcgi/Manifest1
-rw-r--r--www-apache/mod_proxy_fcgi/files/36_mod_proxy_fcgi.conf3
-rw-r--r--www-apache/mod_proxy_fcgi/metadata.xml5
-rw-r--r--www-apache/mod_proxy_fcgi/mod_proxy_fcgi-0_p816361.ebuild22
-rw-r--r--www-apache/mod_proxy_html/Manifest1
-rw-r--r--www-apache/mod_proxy_html/files/27_mod_proxy_html.conf49
-rw-r--r--www-apache/mod_proxy_html/metadata.xml5
-rw-r--r--www-apache/mod_proxy_html/mod_proxy_html-3.1.2.ebuild31
-rw-r--r--www-apache/mod_python/Manifest1
-rw-r--r--www-apache/mod_python/files/16_mod_python.conf33
-rw-r--r--www-apache/mod_python/files/mod_python-3.5.0-buildsystem.patch35
-rw-r--r--www-apache/mod_python/metadata.xml21
-rw-r--r--www-apache/mod_python/mod_python-3.5.0.ebuild53
-rw-r--r--www-apache/mod_qos/Manifest1
-rw-r--r--www-apache/mod_qos/files/10_mod_qos.conf5
-rw-r--r--www-apache/mod_qos/metadata.xml10
-rw-r--r--www-apache/mod_qos/mod_qos-11.12.ebuild55
-rw-r--r--www-apache/mod_rpaf/Manifest1
-rw-r--r--www-apache/mod_rpaf/files/003_ipv6.patch31
-rw-r--r--www-apache/mod_rpaf/files/010_multiple_proxies.patch37
-rw-r--r--www-apache/mod_rpaf/files/011_apache2.4.patch51
-rw-r--r--www-apache/mod_rpaf/files/012_Add-missing-header-for-inet_addr.patch17
-rw-r--r--www-apache/mod_rpaf/files/10_mod_rpaf.conf6
-rw-r--r--www-apache/mod_rpaf/metadata.xml5
-rw-r--r--www-apache/mod_rpaf/mod_rpaf-0.6-r1.ebuild29
-rw-r--r--www-apache/mod_rpaf/mod_rpaf-0.6.ebuild28
-rw-r--r--www-apache/mod_scgi/Manifest1
-rw-r--r--www-apache/mod_scgi/files/20_mod_scgi.conf33
-rw-r--r--www-apache/mod_scgi/files/mod_scgi-1.14-apache-2.4.patch49
-rw-r--r--www-apache/mod_scgi/metadata.xml5
-rw-r--r--www-apache/mod_scgi/mod_scgi-1.14-r1.ebuild33
-rw-r--r--www-apache/mod_scgi/mod_scgi-1.14.ebuild30
-rw-r--r--www-apache/mod_security/Manifest3
-rw-r--r--www-apache/mod_security/files/modsecurity-2.7.conf15
-rw-r--r--www-apache/mod_security/metadata.xml27
-rw-r--r--www-apache/mod_security/mod_security-2.7.4.ebuild97
-rw-r--r--www-apache/mod_security/mod_security-2.7.5.ebuild97
-rw-r--r--www-apache/mod_security/mod_security-2.7.7.ebuild97
-rw-r--r--www-apache/mod_slotlimit/Manifest1
-rw-r--r--www-apache/mod_slotlimit/files/10_mod_slotlimit.conf76
-rw-r--r--www-apache/mod_slotlimit/metadata.xml7
-rw-r--r--www-apache/mod_slotlimit/mod_slotlimit-1.3.ebuild25
-rw-r--r--www-apache/mod_spdy/Manifest3
-rwxr-xr-xwww-apache/mod_spdy/files/make-snapshot.sh47
-rw-r--r--www-apache/mod_spdy/files/mod_spdy-0.9.3.3-execinfo.patch30
-rw-r--r--www-apache/mod_spdy/files/mod_spdy-0.9.3.3-system-zlib.patch39
-rw-r--r--www-apache/mod_spdy/metadata.xml7
-rw-r--r--www-apache/mod_spdy/mod_spdy-0.9.3.3.ebuild114
-rw-r--r--www-apache/mod_spdy/mod_spdy-0.9.4.2.ebuild114
-rw-r--r--www-apache/mod_spdy/mod_spdy-0.9.4.3.ebuild114
-rw-r--r--www-apache/mod_spdy/mod_spdy-9999.ebuild114
-rw-r--r--www-apache/mod_tcl/Manifest1
-rw-r--r--www-apache/mod_tcl/files/27_mod_tcl.conf7
-rw-r--r--www-apache/mod_tcl/metadata.xml5
-rw-r--r--www-apache/mod_tcl/mod_tcl-1.0.1.ebuild31
-rw-r--r--www-apache/mod_tidy/Manifest1
-rw-r--r--www-apache/mod_tidy/files/55_mod_tidy.conf5
-rw-r--r--www-apache/mod_tidy/metadata.xml5
-rw-r--r--www-apache/mod_tidy/mod_tidy-0.5.5-r1.ebuild38
-rw-r--r--www-apache/mod_umask/Manifest1
-rw-r--r--www-apache/mod_umask/files/47_mod_umask.conf15
-rw-r--r--www-apache/mod_umask/metadata.xml5
-rw-r--r--www-apache/mod_umask/mod_umask-0.1.0.ebuild22
-rw-r--r--www-apache/mod_vdbh/Manifest1
-rw-r--r--www-apache/mod_vdbh/files/21_mod_vdbh.conf18
-rw-r--r--www-apache/mod_vdbh/metadata.xml5
-rw-r--r--www-apache/mod_vdbh/mod_vdbh-1.0.3-r1.ebuild29
-rw-r--r--www-apache/mod_vhost_ldap/Manifest1
-rw-r--r--www-apache/mod_vhost_ldap/files/99_mod_vhost_ldap.conf10
-rw-r--r--www-apache/mod_vhost_ldap/metadata.xml5
-rw-r--r--www-apache/mod_vhost_ldap/mod_vhost_ldap-2.4.0.ebuild46
-rw-r--r--www-apache/mod_whatkilledus/Manifest1
-rw-r--r--www-apache/mod_whatkilledus/files/10_mod_whatkilledus.conf5
-rw-r--r--www-apache/mod_whatkilledus/files/gen_test_char.c121
-rw-r--r--www-apache/mod_whatkilledus/metadata.xml5
-rw-r--r--www-apache/mod_whatkilledus/mod_whatkilledus-2.01.ebuild33
-rw-r--r--www-apache/mod_wsgi/Manifest5
-rw-r--r--www-apache/mod_wsgi/files/70_mod_wsgi.conf5
-rw-r--r--www-apache/mod_wsgi/metadata.xml12
-rw-r--r--www-apache/mod_wsgi/mod_wsgi-3.5.ebuild37
-rw-r--r--www-apache/mod_wsgi/mod_wsgi-4.3.0.ebuild38
-rw-r--r--www-apache/mod_wsgi/mod_wsgi-4.4.10.ebuild38
-rw-r--r--www-apache/mod_wsgi/mod_wsgi-4.4.6.ebuild38
-rw-r--r--www-apache/mod_wsgi/mod_wsgi-4.4.9.ebuild38
-rw-r--r--www-apache/mod_xml2enc/Manifest2
-rw-r--r--www-apache/mod_xml2enc/metadata.xml7
-rw-r--r--www-apache/mod_xml2enc/mod_xml2enc-1.0.3.ebuild38
-rw-r--r--www-apache/mod_xsendfile/Manifest1
-rw-r--r--www-apache/mod_xsendfile/files/50_mod_xsendfile.conf20
-rw-r--r--www-apache/mod_xsendfile/metadata.xml18
-rw-r--r--www-apache/mod_xsendfile/mod_xsendfile-1.0_beta1.ebuild28
-rw-r--r--www-apache/modsec-flameeyes/Manifest1
-rw-r--r--www-apache/modsec-flameeyes/metadata.xml8
-rw-r--r--www-apache/modsec-flameeyes/modsec-flameeyes-20130216.ebuild56
-rw-r--r--www-apache/modsec-flameeyes/modsec-flameeyes-99999999.ebuild56
-rw-r--r--www-apache/modsecurity-crs/Manifest2
-rw-r--r--www-apache/modsecurity-crs/metadata.xml11
-rw-r--r--www-apache/modsecurity-crs/modsecurity-crs-2.2.6-r1.ebuild137
-rw-r--r--www-apache/modsecurity-crs/modsecurity-crs-2.2.7.ebuild132
-rw-r--r--www-apache/mpm_itk/Manifest1
-rw-r--r--www-apache/mpm_itk/files/00_mpm_itk.conf5
-rw-r--r--www-apache/mpm_itk/metadata.xml7
-rw-r--r--www-apache/mpm_itk/mpm_itk-2.4.7_p2.ebuild51
-rw-r--r--www-apache/passenger/Manifest5
-rw-r--r--www-apache/passenger/files/2.2.15-gentoo-multilib-strict.patch33
-rw-r--r--www-apache/passenger/files/2.2.4-gentoo.patch42
-rw-r--r--www-apache/passenger/files/30_mod_passenger-2.0.1.conf63
-rw-r--r--www-apache/passenger/files/30_mod_passenger-4.0.0.conf63
-rw-r--r--www-apache/passenger/files/30_mod_passenger-5.0.0.conf63
-rw-r--r--www-apache/passenger/files/passenger-3.0.0-gentoo.patch34
-rw-r--r--www-apache/passenger/files/passenger-3.0.0-ldflags.patch13
-rw-r--r--www-apache/passenger/files/passenger-3.0.12-ldflags.patch10
-rw-r--r--www-apache/passenger/files/passenger-3.0.21-temp-file-usage.patch140
-rw-r--r--www-apache/passenger/files/passenger-3.0.8-gentoo.patch35
-rw-r--r--www-apache/passenger/files/passenger-4.0.10-gentoo.patch48
-rw-r--r--www-apache/passenger/files/passenger-4.0.18-gentoo.patch39
-rw-r--r--www-apache/passenger/files/passenger-4.0.21-gentoo.patch40
-rw-r--r--www-apache/passenger/files/passenger-4.0.33-gentoo.patch30
-rw-r--r--www-apache/passenger/files/passenger-4.0.49-gentoo.patch30
-rw-r--r--www-apache/passenger/files/passenger-5.0.4-gentoo.patch30
-rw-r--r--www-apache/passenger/metadata.xml11
-rw-r--r--www-apache/passenger/passenger-4.0.53.ebuild118
-rw-r--r--www-apache/passenger/passenger-4.0.59.ebuild115
-rw-r--r--www-apache/passenger/passenger-5.0.13.ebuild118
-rw-r--r--www-apache/passenger/passenger-5.0.14.ebuild118
-rw-r--r--www-apache/passenger/passenger-5.0.4.ebuild114
-rw-r--r--www-apache/pwauth/Manifest1
-rw-r--r--www-apache/pwauth/files/pwauth-2.3.10-config.patch38
-rw-r--r--www-apache/pwauth/files/pwauth-2.3.10-makefile.patch42
-rw-r--r--www-apache/pwauth/files/pwauth-strchr.patch11
-rw-r--r--www-apache/pwauth/files/pwauth.pam-include6
-rw-r--r--www-apache/pwauth/metadata.xml12
-rw-r--r--www-apache/pwauth/pwauth-2.3.10.ebuild73
413 files changed, 13899 insertions, 0 deletions
diff --git a/www-apache/anyterm/Manifest b/www-apache/anyterm/Manifest
new file mode 100644
index 000000000000..3f6b4f5770e4
--- /dev/null
+++ b/www-apache/anyterm/Manifest
@@ -0,0 +1 @@
+DIST anyterm-1.1.29.tbz2 178424 SHA256 6e7710cf2240cb4eced295bdf17de4b6ce223c7fe4d1668260a6d60a8aec9846
diff --git a/www-apache/anyterm/anyterm-1.1.29.ebuild b/www-apache/anyterm/anyterm-1.1.29.ebuild
new file mode 100644
index 000000000000..98decc427ad5
--- /dev/null
+++ b/www-apache/anyterm/anyterm-1.1.29.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+
+inherit eutils flag-o-matic
+
+DESCRIPTION="A terminal anywhere"
+HOMEPAGE="http://anyterm.org/"
+SRC_URI="http://anyterm.org/download/${P}.tbz2"
+
+LICENSE="GPL-2 Boost-1.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="virtual/ssh"
+DEPEND="${RDEPEND}
+ >=dev-libs/boost-1.34.1"
+
+src_prepare() {
+ epatch "${FILESDIR}/${PN}-1.1.28-respect-LDFLAGS.patch"
+ epatch "${FILESDIR}/${P}-gcc-4.4.patch"
+ epatch "${FILESDIR}/${P}-boost-1.50.patch"
+}
+
+src_compile() {
+ # this package uses `ld -r -b binary` and thus resulting executable contains
+ # executable stack
+ append-ldflags -Wl,-z,noexecstack
+ emake CC="$(tc-getCC)" CXX="$(tc-getCXX)" || die
+}
+
+src_install() {
+ dosbin anytermd || die
+ dodoc CHANGELOG README || die
+ doman anytermd.1 || die
+ newinitd "${FILESDIR}/anyterm.init.d" anyterm || die
+ newconfd "${FILESDIR}/anyterm.conf.d" anyterm || die
+}
+
+pkg_postinst() {
+ elog "To proceed installation, read following:"
+ elog "http://anyterm.org/1.1/install.html"
+}
diff --git a/www-apache/anyterm/files/anyterm-1.1.28-respect-LDFLAGS.patch b/www-apache/anyterm/files/anyterm-1.1.28-respect-LDFLAGS.patch
new file mode 100644
index 000000000000..25a12e756ab0
--- /dev/null
+++ b/www-apache/anyterm/files/anyterm-1.1.28-respect-LDFLAGS.patch
@@ -0,0 +1,26 @@
+=== modified file 'common.mk'
+--- common.mk 2009-01-24 12:40:55 +0000
++++ common.mk 2009-01-24 14:02:19 +0000
+@@ -71,7 +71,7 @@
+ OBJS=$(addsuffix .o,$(notdir $(basename $(CC_SRCS))))
+
+ %.o: %.cc
+- $(CXX) $(CC_COMPILE_FLAGS) -c $<
++ $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(CC_COMPILE_FLAGS) -c $<
+
+ ifdef HAVE_GNU_LD
+ %.blob.o: ../browser/%
+@@ -87,10 +87,10 @@
+
+
+ anytermd: $(OBJS) $(BLOBS) $(LIBPBE_LIB)
+- $(CXX) -o $@ $(OBJS) $(BLOBS) $(LINK_FLAGS)
++ $(CXX) -o $@ $(LDFLAGS) $(OBJS) $(BLOBS) $(LINK_FLAGS)
+
+ %.d: %.cc
+- $(CXX) -MM -MG -MT $@ -MT $(<:%.cc=%.o) $(CPP_FLAGS) $(GCC_FLAGS) -o $@ $<
++ $(CXX) $(CPPFLAGS) $(CXXFLAGS) -MM -MG -MT $@ -MT $(<:%.cc=%.o) $(CPP_FLAGS) $(GCC_FLAGS) -o $@ $<
+
+ DEPENDS=$(addsuffix .d,$(basename $(OBJS)))
+
+
diff --git a/www-apache/anyterm/files/anyterm-1.1.29-boost-1.50.patch b/www-apache/anyterm/files/anyterm-1.1.29-boost-1.50.patch
new file mode 100644
index 000000000000..b0648a9e3067
--- /dev/null
+++ b/www-apache/anyterm/files/anyterm-1.1.29-boost-1.50.patch
@@ -0,0 +1,58 @@
+Patch by Arfrever; sent to upstream developer.
+
+--- libpbe/src/parse_http_request.cc
++++ libpbe/src/parse_http_request.cc
+@@ -18,11 +18,11 @@
+
+ #include "parse_http_request.hh"
+
+-#include <boost/spirit.hpp>
+-#include <boost/spirit/actor/insert_at_actor.hpp>
+-#include <boost/spirit/dynamic/if.hpp>
+-#include <boost/spirit/utility/loops.hpp>
+-#include <boost/spirit/iterator/multi_pass.hpp>
++#include <boost/spirit/include/classic.hpp>
++#include <boost/spirit/include/classic_if.hpp>
++#include <boost/spirit/include/classic_insert_at_actor.hpp>
++#include <boost/spirit/include/classic_loops.hpp>
++#include <boost/spirit/include/classic_multi_pass.hpp>
+
+ #include <boost/lexical_cast.hpp>
+ #include <boost/scoped_array.hpp>
+@@ -31,7 +31,7 @@
+
+
+ using namespace std;
+-using namespace boost::spirit;
++using namespace boost::spirit::classic;
+
+
+ namespace pbe {
+--- libpbe/src/URI.cc
++++ libpbe/src/URI.cc
+@@ -18,11 +18,11 @@
+
+ #include "URI.hh"
+
+-#include <boost/spirit.hpp>
+-#include <boost/spirit/actor/insert_at_actor.hpp>
+-#include <boost/spirit/dynamic/if.hpp>
+-#include <boost/spirit/utility/loops.hpp>
+-#include <boost/spirit/iterator/multi_pass.hpp>
++#include <boost/spirit/include/classic.hpp>
++#include <boost/spirit/include/classic_if.hpp>
++#include <boost/spirit/include/classic_insert_at_actor.hpp>
++#include <boost/spirit/include/classic_loops.hpp>
++#include <boost/spirit/include/classic_multi_pass.hpp>
+
+ #include <boost/lexical_cast.hpp>
+ #include <boost/scoped_array.hpp>
+@@ -30,7 +30,7 @@
+ #include <map>
+
+ using namespace std;
+-using namespace boost::spirit;
++using namespace boost::spirit::classic;
+
+
+ namespace pbe {
diff --git a/www-apache/anyterm/files/anyterm-1.1.29-gcc-4.4.patch b/www-apache/anyterm/files/anyterm-1.1.29-gcc-4.4.patch
new file mode 100644
index 000000000000..3809f5aac186
--- /dev/null
+++ b/www-apache/anyterm/files/anyterm-1.1.29-gcc-4.4.patch
@@ -0,0 +1,10 @@
+--- libpbe/src/SmtpClient.cc
++++ libpbe/src/SmtpClient.cc
+@@ -20,6 +20,7 @@
+ #include "ip.hh"
+ #include "select.hh"
+
++#include <stdio.h>
+ #include <syslog.h>
+ #include <unistd.h>
+
diff --git a/www-apache/anyterm/files/anyterm.conf.d b/www-apache/anyterm/files/anyterm.conf.d
new file mode 100644
index 000000000000..d4aa00bf987b
--- /dev/null
+++ b/www-apache/anyterm/files/anyterm.conf.d
@@ -0,0 +1,7 @@
+# run anytermd as this user
+USER='nobody'
+# run anyterm on this port
+PORT='7676'
+
+# Other options you wish to pass to anyterm
+ANYTERM_OPTIONS="--local-only"
diff --git a/www-apache/anyterm/files/anyterm.init.d b/www-apache/anyterm/files/anyterm.init.d
new file mode 100644
index 000000000000..771f4bc1c050
--- /dev/null
+++ b/www-apache/anyterm/files/anyterm.init.d
@@ -0,0 +1,21 @@
+#!/sbin/runscript
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License, v2 or later
+# $Id$
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting ${SVCNAME}"
+ start-stop-daemon --start --exec /usr/sbin/anytermd -- \
+ --user "${USER}" --port ${PORT} ${ANYTERM_OPTIONS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ${SVCNAME}"
+ start-stop-daemon --stop --exec /usr/sbin/anytermd
+ eend $?
+}
diff --git a/www-apache/anyterm/metadata.xml b/www-apache/anyterm/metadata.xml
new file mode 100644
index 000000000000..6632069b5aff
--- /dev/null
+++ b/www-apache/anyterm/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>web-apps</herd>
+</pkgmetadata>
diff --git a/www-apache/libapreq2/Manifest b/www-apache/libapreq2/Manifest
new file mode 100644
index 000000000000..1015c929bce9
--- /dev/null
+++ b/www-apache/libapreq2/Manifest
@@ -0,0 +1 @@
+DIST libapreq2-2.13.tar.gz 891320 SHA256 5731e6833b32d88e4a5c690e45ddf20fcf969ce3da666c5627d775e92da0cf6e SHA512 54553cb90c0d3f6fb34ff19364c5804976c4aff1bae551ae051fdd06f41695770f1e285c40e03dbd93ae738adc332f38f1a1994167598364071feaec833fdf05 WHIRLPOOL 8b018b5d71dc83c1029a0d4040f94fca8fcf1ea4490c4d34d0a702d873242953c22eed497c6c2e9d493f2386f4e37e8f462c02371e1e51d347d9f4ab383ae466
diff --git a/www-apache/libapreq2/files/76_mod_apreq.conf b/www-apache/libapreq2/files/76_mod_apreq.conf
new file mode 100644
index 000000000000..15d925d404f8
--- /dev/null
+++ b/www-apache/libapreq2/files/76_mod_apreq.conf
@@ -0,0 +1,13 @@
+<IfDefine APREQ>
+LoadModule apreq_module modules/mod_apreq2.so
+
+# load the Perl modules
+# uncomment the ones you require
+#PerlModule APR::Request::Apache2
+#PerlModule APR::Request::CGI
+#PerlModule APR::Request::Cookie
+#PerlModule Apache2::Cookie
+#PerlModule Apache2::Request
+</IfDefine>
+
+# vim: ts=4 filetype=apache
diff --git a/www-apache/libapreq2/files/libapreq2-2.08-doc.patch b/www-apache/libapreq2/files/libapreq2-2.08-doc.patch
new file mode 100644
index 000000000000..a1e444070320
--- /dev/null
+++ b/www-apache/libapreq2/files/libapreq2-2.08-doc.patch
@@ -0,0 +1,24 @@
+diff -Naurp libapreq2-2.08.old/build/doxygen.conf libapreq2-2.08/build/doxygen.conf
+--- libapreq2-2.08.old/build/doxygen.conf 2006-08-09 00:30:19.000000000 -0400
++++ libapreq2-2.08/build/doxygen.conf 2007-05-05 07:54:21.000000000 -0400
+@@ -27,7 +27,7 @@ WARN_IF_UNDOCUMENTED = YES
+ WARN_IF_DOC_ERROR = YES
+ WARN_FORMAT = "$file:$line: $text"
+
+-INPUT = . include module/apache module/apache2
++INPUT = . include module/apache2
+ FILE_PATTERNS = *.h *.dox CHANGES STATUS
+ RECURSIVE = NO
+ EXTRACT_STATIC = YES
+diff -Naurp libapreq2-2.08.old/build/doxygen.conf.in libapreq2-2.08/build/doxygen.conf.in
+--- libapreq2-2.08.old/build/doxygen.conf.in 2006-08-09 00:26:44.000000000 -0400
++++ libapreq2-2.08/build/doxygen.conf.in 2007-05-05 07:57:18.000000000 -0400
+@@ -27,7 +27,7 @@ WARN_IF_UNDOCUMENTED = YES
+ WARN_IF_DOC_ERROR = YES
+ WARN_FORMAT = "$file:$line: $text"
+
+-INPUT = . include module/apache module/apache2
++INPUT = . include module/apache2
+ FILE_PATTERNS = *.h *.dox CHANGES STATUS
+ RECURSIVE = NO
+ EXTRACT_STATIC = YES
diff --git a/www-apache/libapreq2/libapreq2-2.13-r1.ebuild b/www-apache/libapreq2/libapreq2-2.13-r1.ebuild
new file mode 100644
index 000000000000..e1364503161d
--- /dev/null
+++ b/www-apache/libapreq2/libapreq2-2.13-r1.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit apache-module perl-module multilib
+
+DESCRIPTION="A library for manipulating client request data via the Apache API"
+SRC_URI="mirror://apache/httpd/libapreq/${P}.tar.gz"
+HOMEPAGE="http://httpd.apache.org/apreq/"
+
+LICENSE="Apache-2.0"
+SLOT="2"
+KEYWORDS="amd64 ppc ppc64 x86"
+IUSE="perl"
+
+DEPEND="${DEPEND}
+ perl? (
+ >=dev-perl/ExtUtils-XSBuilder-0.23
+ virtual/perl-version
+ >=www-apache/mod_perl-2
+ )"
+RDEPEND="${DEPEND}"
+
+APACHE2_MOD_FILE="module/apache2/.libs/mod_apreq2.so"
+APACHE2_MOD_CONF="76_mod_apreq"
+APACHE2_MOD_DEFINE="APREQ"
+DOCFILES="docs/html/*.html CHANGES README INSTALL MANIFEST"
+
+need_apache2
+
+pkg_setup() {
+ perl_set_version
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/libapreq2-2.08-doc.patch
+
+ sed -i -e "s/PERL \$PERL_OPTS/PERL/" "${S}"/acinclude.m4 || die
+ sed -i -e "s/PERL \$PERL_OPTS/PERL/" "${S}"/aclocal.m4 || die
+ sed -i -e "s/PERL \$PERL_OPTS/PERL/" "${S}"/configure || die
+}
+
+src_configure() {
+ econf \
+ --with-apache2-apxs=${APXS} \
+ $(use_enable perl perl-glue)
+}
+
+src_install() {
+ apache-module_src_install
+
+ make DESTDIR="${D}" INSTALLDIRS=vendor install || die "make install failed"
+ doman docs/man/man3/*.3
+
+ perl_delete_localpod
+
+ for i in $(find "${D}" -type f -not -name '*.so'); do
+ if file ${i} | grep -i " text"; then
+ sed -i -e "s:${D}:/:g" ${i}
+ fi
+ done
+}
diff --git a/www-apache/libapreq2/metadata.xml b/www-apache/libapreq2/metadata.xml
new file mode 100644
index 000000000000..4538a68724a6
--- /dev/null
+++ b/www-apache/libapreq2/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer><email>maintainer-needed@gentoo.org</email></maintainer>
+</pkgmetadata>
diff --git a/www-apache/metadata.xml b/www-apache/metadata.xml
new file mode 100644
index 000000000000..e9ae8a0d9ae8
--- /dev/null
+++ b/www-apache/metadata.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE catmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<catmetadata>
+ <longdescription lang="en">
+ The www-apache category contains modules for the Apache webserver.
+ </longdescription>
+ <longdescription lang="es">
+ La categoría www-apache contiene módulos del servidor web Apache.
+ </longdescription>
+ <longdescription lang="de">
+ Die Kategorie www-apache enthält Module für den Webserver Apache.
+ </longdescription>
+ <longdescription lang="ja">
+ www-apacheカテゴリーにはApacheウエブサーバーのモジュールが含まれています。
+ </longdescription>
+ <longdescription lang="nl">
+ De www-apache categorie bevat modules voor de Apache webserver.
+ </longdescription>
+ <longdescription lang="sk">
+ Kategória www-apache obsahuje moduly pre webserver Apache.
+ </longdescription>
+ <longdescription lang="vi">
+ Nhóm www-apache chứa các module cho Apache server.
+ </longdescription>
+ <longdescription lang="sk">
+ Táto kategória obsahuje moduly pre webserver Apache.
+ </longdescription>
+ <longdescription lang="it">
+ La categoria www-apache contiene moduli per il web server Apache.
+ </longdescription>
+ <longdescription lang="pt">
+ A categoria www-apache contém certos módulos para o servidor de
+ web Apache.
+ </longdescription>
+ <longdescription lang="pl">
+ Kategoria www-apache zawiera moduły serwera Apache.
+ </longdescription>
+</catmetadata>
+
diff --git a/www-apache/mod-auth-mysql/Manifest b/www-apache/mod-auth-mysql/Manifest
new file mode 100644
index 000000000000..e056fbd17235
--- /dev/null
+++ b/www-apache/mod-auth-mysql/Manifest
@@ -0,0 +1,2 @@
+DIST mod-auth-mysql_4.3.9-13.diff.gz 20317 SHA256 3c99e3e62dd147ecdc1fe01732bcfe46aac29838e6aadefdb896d6433e3bbc55 SHA512 d738e9996dfa6a8bc89c19fb472bb43521ee915599a0cccd0b3de5546b10951f7ad4ce7cf1a98a6fc078ab9ea66b37c6b9761ad20bd77a09fb97bcaca5d1f41c WHIRLPOOL cf1a5934da0ffb254337bdaec62d572291688a0cfce9e3a9da9ad5cb22c35c7c0f2b660382d54c2e7becb51c70c1ffe4d7cc44f9d5ad9f85a1d13c5e34c879a5
+DIST mod-auth-mysql_4.3.9.orig.tar.gz 48479 SHA256 ed0d42547808fe9a213cf62e93ffef65e518da774bb497138d126f2de4a54d2e SHA512 292c167706f31542c74f24e481a227a36dfdfea57fc51f471188e2fd5188dc785789bd060f9c9d90d94a67492dc7ec64331a1af83fade4f70549cb9ddfb32f16 WHIRLPOOL 51ff68311b82a46bf541d056770911e3b5ad310dac44ddf7f33a8b3a16d399b01a62bdafc6341af63d5a13e693529a8bcb1642c9b42b50205734010a466e60ac
diff --git a/www-apache/mod-auth-mysql/files/12_mod_auth_mysql.conf b/www-apache/mod-auth-mysql/files/12_mod_auth_mysql.conf
new file mode 100644
index 000000000000..e2d52c14efeb
--- /dev/null
+++ b/www-apache/mod-auth-mysql/files/12_mod_auth_mysql.conf
@@ -0,0 +1,132 @@
+<IfDefine AUTH_MYSQL>
+LoadModule auth_mysql_module modules/apache2_mod_auth_mysql.so
+
+# mod_auth_mysql can be used to limit access to documents by checking
+# data in a MySQL database.
+
+# This will enable user-based MySQL authentication of everything
+# within /home/httpd. You'll need to do the following as the MySQL
+# root user beforehand:
+#
+# CREATE DATABASE auth;
+# USE auth;
+# CREATE TABLE users (
+# user_name CHAR(30) NOT NULL,
+# user_passwd CHAR(20) NOT NULL,
+# PRIMARY KEY (user_name)
+# );
+# GRANT SELECT
+# ON auth.users
+# TO authuser@localhost
+# IDENTIFIED BY 'PaSsW0Rd';
+#
+# INSERT INTO users VALUES ('testuser', ENCRYPT('testpass'));
+#
+#<Directory /home/httpd>
+# # If you want tot make mod_auth_mysql work with apache-2.2, please uncomment
+# # the following line:
+# #AuthBasicAuthoritative Off
+# AuthName "MySQL authenticated zone"
+# AuthType Basic
+#
+# AuthMySQLUser authuser
+# AuthMySQLPassword PaSsW0Rd
+# AuthMySQLDB auth
+# AuthMySQLUserTable users
+# AuthMySQLNameField user_name
+# AuthMySQLPasswordField user_passwd
+#
+# require valid-user
+#</Directory>
+
+# This will enable group-based MySQL authentication of everything
+# within /home/httpd. You'll need to do the following as the MySQL
+# root user beforehand:
+#
+# CREATE DATABASE auth;
+# USE auth;
+# CREATE TABLE users (
+# user_name CHAR(30) NOT NULL,
+# user_passwd CHAR(20) NOT NULL,
+# user_group CHAR(20) NOT NULL,
+# PRIMARY KEY (user_name)
+# );
+# GRANT SELECT
+# ON auth.users
+# TO authuser@localhost
+# IDENTIFIED BY 'PaSsW0Rd';
+#
+# INSERT INTO users VALUES ('testuser', ENCRYPT('testpass'), 'user');
+# INSERT INTO users VALUES ('testadmin', ENCRYPT('testpass'), 'admin');
+#
+#<Directory /home/httpd>
+# # If you want tot make mod_auth_mysql work with apache-2.2, please uncomment
+# # the following line:
+# #AuthBasicAuthoritative Off
+# AuthName "MySQL group authenticated zone"
+# AuthType Basic
+#
+# AuthMySQLUser authuser
+# AuthMySQLPassword PaSsW0Rd
+# AuthMySQLDB auth
+# AuthMySQLUserTable users
+# AuthMySQLNameField user_name
+# AuthMySQLPasswordField user_passwd
+# AuthMySQLGroupField user_group
+#
+# require group admin
+#</Directory>
+
+# Like the above this enables group-based MySQL authentication of
+# everything within /home/httpd, but this configuration allows users to
+# belong to more than one group. You'll need to do the following as
+# the MySQL root user beforehand:
+#
+# CREATE DATABASE auth;
+# USE auth;
+# CREATE TABLE users (
+# user_name CHAR(30) NOT NULL,
+# user_passwd CHAR(20) NOT NULL,
+# PRIMARY KEY (user_name)
+# );
+# CREATE TABLE groups (
+# user_name CHAR(30) NOT NULL,
+# user_group CHAR(20) NOT NULL,
+# PRIMARY KEY (user_name, user_group)
+# );
+# GRANT SELECT
+# ON auth.users
+# TO authuser@localhost
+# IDENTIFIED BY 'PaSsW0Rd';
+# GRANT SELECT
+# ON auth.groups
+# TO authuser@localhost
+# IDENTIFIED BY 'PaSsW0Rd';
+#
+# INSERT INTO users VALUES ('testuser', ENCRYPT('testpass'));
+# INSERT INTO groups VALUES ('testuser', 'user');
+# INSERT INTO users VALUES ('testadmin', ENCRYPT('testpass'));
+# INSERT INTO groups VALUES ('testadmin', 'admin');
+# INSERT INTO groups VALUES ('testadmin', 'user');
+#
+#<Directory /home/httpd>
+# # If you want tot make mod_auth_mysql work with apache-2.2, please uncomment
+# # the following line:
+# #AuthBasicAuthoritative Off
+# AuthName "MySQL group authenticated zone"
+# AuthType Basic
+#
+# AuthMySQLUser authuser
+# AuthMySQLPassword PaSsW0Rd
+# AuthMySQLDB auth
+# AuthMySQLUserTable users
+# AuthMySQLNameField user_name
+# AuthMySQLPasswordField user_passwd
+# AuthMySQLGroupTable groups
+# AuthMySQLGroupField user_group
+#
+# require group user
+#</Directory>
+</IfDefine>
+
+# vim: ts=4 filetype=apache
diff --git a/www-apache/mod-auth-mysql/metadata.xml b/www-apache/mod-auth-mysql/metadata.xml
new file mode 100644
index 000000000000..abf3529deac0
--- /dev/null
+++ b/www-apache/mod-auth-mysql/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>mysql</herd>
+</pkgmetadata>
diff --git a/www-apache/mod-auth-mysql/mod-auth-mysql-4.3.9-r1.ebuild b/www-apache/mod-auth-mysql/mod-auth-mysql-4.3.9-r1.ebuild
new file mode 100644
index 000000000000..48d22083d859
--- /dev/null
+++ b/www-apache/mod-auth-mysql/mod-auth-mysql-4.3.9-r1.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit apache-module eutils
+
+DESCRIPTION="Apache 2 module enabling HTTP authentication against MySQL databases. "
+HOMEPAGE="http://packages.debian.org/source/mod-auth-mysql"
+DEBIAN_PV="13"
+MY_P="${PN}_${PV/-/_}"
+DEBIAN_URI="mirror://debian/pool/main/${PN:0:1}/${PN}"
+DEBIAN_PATCH="${MY_P}-${DEBIAN_PV}.diff.gz"
+DEBIAN_SRC="${MY_P}.orig.tar.gz"
+SRC_URI="${DEBIAN_URI}/${DEBIAN_SRC} ${DEBIAN_URI}/${DEBIAN_PATCH}"
+
+LICENSE="Apache-1.1"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE=""
+
+DEPEND="virtual/mysql"
+RDEPEND="${DEPEND}
+ !www-apache/mod_auth_mysql"
+
+APACHE2_MOD_FILE="${S}/apache2_mod_auth_mysql.so"
+APACHE2_MOD_CONF="12_${PN//-/_}"
+APACHE2_MOD_DEFINE="AUTH_MYSQL"
+
+DOCFILES="USAGE DIRECTIVES"
+
+need_apache2_2
+
+src_unpack() {
+ unpack "${DEBIAN_SRC}"
+}
+
+src_prepare() {
+ EPATCH_OPTS="-p1" epatch "${DISTDIR}"/"${DEBIAN_PATCH}"
+ for i in $(<"${S}"/debian/patches/00list) ; do
+ epatch "${S}"/debian/patches/${i}*
+ done
+ epatch_user
+}
+
+src_configure() {
+ econf \
+ --enable-apache2 \
+ --disable-apache13 \
+ --with-apxs2=/usr/sbin/apxs2
+}
+
+src_compile() {
+ default
+}
+
+src_install() {
+ apache-module_src_install
+}
diff --git a/www-apache/mod_access_dnsbl/Manifest b/www-apache/mod_access_dnsbl/Manifest
new file mode 100644
index 000000000000..2e4616a4e91e
--- /dev/null
+++ b/www-apache/mod_access_dnsbl/Manifest
@@ -0,0 +1 @@
+DIST mod_access_dnsbl-0.02.tar.gz 3648 SHA256 9f2aba05c8a026866529f7e51d2035e288eb184a46cfc7ecacb6548a2b279bce SHA512 5d4217798f2fdced4e6bac55187edfb8534ce4db85a0ca7d3e5a832b962ea12df8ad47284e4f29f9ce5029bd26ffafc403cf3b8cb566d1a108168162a68682f6 WHIRLPOOL 97900fb78d851bab84635a5bb955e586e5b0f6390b49ff7d2a9bab5f05dd865c50c4332e81aa68ed73bf9ae0b071a236bb0a0edcabf7f61a75cf4d43cf87a718
diff --git a/www-apache/mod_access_dnsbl/files/10_mod_access_dnsbl.conf b/www-apache/mod_access_dnsbl/files/10_mod_access_dnsbl.conf
new file mode 100644
index 000000000000..7e9419e97fd1
--- /dev/null
+++ b/www-apache/mod_access_dnsbl/files/10_mod_access_dnsbl.conf
@@ -0,0 +1,11 @@
+<IfDefine DNSBL>
+LoadModule access_dnsbl_module modules/mod_access_dnsbl.so
+
+# example configuration:
+#<Directory /var/www/localhost/htdocs/protected>
+# DNSBLOrder allow,deny
+# DNSBLDeny from spammers
+#</Directory>
+</IfDefine>
+
+# vim: ts=4 filetype=apache
diff --git a/www-apache/mod_access_dnsbl/metadata.xml b/www-apache/mod_access_dnsbl/metadata.xml
new file mode 100644
index 000000000000..4538a68724a6
--- /dev/null
+++ b/www-apache/mod_access_dnsbl/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer><email>maintainer-needed@gentoo.org</email></maintainer>
+</pkgmetadata>
diff --git a/www-apache/mod_access_dnsbl/mod_access_dnsbl-0.02.ebuild b/www-apache/mod_access_dnsbl/mod_access_dnsbl-0.02.ebuild
new file mode 100644
index 000000000000..664232c06083
--- /dev/null
+++ b/www-apache/mod_access_dnsbl/mod_access_dnsbl-0.02.ebuild
@@ -0,0 +1,24 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit apache-module
+
+DESCRIPTION="Specify access controls based on DNSBL zones"
+HOMEPAGE="http://www.apacheconsultancy.com/modules/${PN}/"
+SRC_URI="http://www.apacheconsultancy.com/modules/${PN}/${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="www-apache/mod_dnsbl_lookup"
+RDEPEND="${DEPEND}"
+
+APACHE2_MOD_CONF="10_${PN}"
+APACHE2_MOD_DEFINE="DNSBL"
+
+need_apache2
diff --git a/www-apache/mod_anonymize_ip/Manifest b/www-apache/mod_anonymize_ip/Manifest
new file mode 100644
index 000000000000..e495ef146fb3
--- /dev/null
+++ b/www-apache/mod_anonymize_ip/Manifest
@@ -0,0 +1 @@
+DIST mod_anonymize_ip-0.3.1.tar.gz 4049 SHA256 5ff3cf2098e2ea8f4e9028d028c03bcb876e7eb096ced7c21b281710a26f953d SHA512 43b108d6cb802fb5108d39a9b801d79ef5bf5e02ba0a07f4cd7030c96b74ec323b858b0239107153c9a64e22c061c2ffc9a9f7a3d9a2c03d0f6faa27789f1c6d WHIRLPOOL 259790426ee01dd3ecee7cf2e8901ae40abfa637b0138c0dfa3d03134f43bed575116885ae500eb598c76159ab305ad87d63e7b6cfb0a740c8c96ca2363f2b35
diff --git a/www-apache/mod_anonymize_ip/files/20_mod_anonymize_ip.conf b/www-apache/mod_anonymize_ip/files/20_mod_anonymize_ip.conf
new file mode 100644
index 000000000000..258716ad73b2
--- /dev/null
+++ b/www-apache/mod_anonymize_ip/files/20_mod_anonymize_ip.conf
@@ -0,0 +1,6 @@
+<IfDefine ANONYMIZE_IP>
+LoadModule anonymize_ip_module modules/mod_anonymize_ip.so
+AnonymizeIP 8
+</IfDefine>
+
+# vim: ts=4 filetype=apache
diff --git a/www-apache/mod_anonymize_ip/metadata.xml b/www-apache/mod_anonymize_ip/metadata.xml
new file mode 100644
index 000000000000..0302f76d1184
--- /dev/null
+++ b/www-apache/mod_anonymize_ip/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>maintainer-needed@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">hollow/mod_anonymize_ip</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/www-apache/mod_anonymize_ip/mod_anonymize_ip-0.3.1.ebuild b/www-apache/mod_anonymize_ip/mod_anonymize_ip-0.3.1.ebuild
new file mode 100644
index 000000000000..bd70e3c46e74
--- /dev/null
+++ b/www-apache/mod_anonymize_ip/mod_anonymize_ip-0.3.1.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit apache-module
+
+GITHUB_AUTHOR="hollow"
+GITHUB_PROJECT="mod_anonymize_ip"
+GITHUB_COMMIT="c0d31d0"
+
+DESCRIPTION="mod_anonymize_ip is a simple module for anonymizing the client IP address"
+HOMEPAGE="http://github.com/hollow/mod_anonymize_ip"
+SRC_URI="http://nodeload.github.com/${GITHUB_AUTHOR}/${GITHUB_PROJECT}/tarball/v${PV} -> ${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND=""
+
+APACHE2_MOD_CONF="20_${PN}"
+APACHE2_MOD_DEFINE="ANONYMIZE_IP"
+
+need_apache2_2
+
+S="${WORKDIR}"/${GITHUB_AUTHOR}-${GITHUB_PROJECT}-${GITHUB_COMMIT}
diff --git a/www-apache/mod_auth_cookie_mysql2/Manifest b/www-apache/mod_auth_cookie_mysql2/Manifest
new file mode 100644
index 000000000000..4e3da3798222
--- /dev/null
+++ b/www-apache/mod_auth_cookie_mysql2/Manifest
@@ -0,0 +1 @@
+DIST mod_auth_cookie_mysql2_1.0.tar.gz 7406 SHA256 85601beea7a6de0ba8ef466027e6783cebef05c4687dc50460d2fdb06f5babe4 SHA512 66ccffdcbae640c396305506ee588c86ffc937422ac36fc68af1e7977210b4c8a3e8090125facd8acf37667c720853774096d564e02d4ad186d14f714998e5b7 WHIRLPOOL 5ede56d86a10d8cfdf1dd5714c0cb9ea3cdc9c08f99f09575eb95ffb5e9d90b8e6e586d839b252510608376cb67197e000abdc4b2410def81e13b5449d7eeda9
diff --git a/www-apache/mod_auth_cookie_mysql2/files/55_mod_auth_cookie_mysql2.conf b/www-apache/mod_auth_cookie_mysql2/files/55_mod_auth_cookie_mysql2.conf
new file mode 100644
index 000000000000..6bb94fa3e742
--- /dev/null
+++ b/www-apache/mod_auth_cookie_mysql2/files/55_mod_auth_cookie_mysql2.conf
@@ -0,0 +1,95 @@
+<IfDefine AUTH_COOKIE_MYSQL2>
+LoadModule auth_cookie_mysql2_module modules/mod_auth_cookie_sql2.so
+
+# MOD_AUTH_COOKIE_MYSQL Configuration section.
+# For more information look at the configuration section at
+# http://home.digithi.de/digithi/dev/mod_auth_cookie_mysql/#configuration
+
+# The MOD_AUTH_COOKIE_MYSQL2 directives must be inside of a <Directory>
+# block to work correctly!
+#<Directory "/var/www/localhost/">
+ # CookieAuth: Activates this module.
+ # REQUIRED: Yes
+ # Options: on|off
+ #CookieAuth
+
+ # CookieAuth_DBhost: Hostname or IP of the host where MySQL is running on.
+ # REQUIRED: Yes
+ # Options: <hostname or IP>
+ #CookieAuth_DBhost
+
+ # CookieAuth_DBName: Name of the MySQL database.
+ # REQUIRED: Yes
+ # Options: <dbname>
+ #CookieAuth_DBName
+
+ # CookieAuth_DBTable: Table name in database.
+ # REQUIRED: Yes
+ # Options: <tbname>
+ #CookieAuth_DBTable
+
+ # CookieAuth_DBUser: MySQL username with permissions to database and table.
+ # REQUIRED: Yes
+ # Options: <username>
+ #CookieAuth_DBUser
+
+ # CookieAuth_DBPassword: password for user in CookieAuth_DBUser.
+ # REQUIRED: Yes
+ # Options: <password>
+ #CookieAuth_DBPassword
+
+ # CookieAuth_UsernameField: Field in MySQL table where username of session is stored.
+ # This username is displayed as the "Remote Username" variable "REMOTE_USER" in Apache.
+ # REQUIRED: Yes
+ # Options: <fieldname>
+ #CookieAuth_UsernameField
+
+ # CookieAuth_SessnameField: Field in MySQL table where session name is stored. This is
+ # the name of the cookie!
+ # REQUIRED: Yes
+ # Options: <fieldname>
+ #CookieAuth_SessnameField
+
+ # CookieAuth_SessvalField: Field in MySQL table where session value (this is the value
+ # which is compared with the cookie value) is stored.
+ # REQUIRED: Yes
+ # Options: <fieldname>
+ #CookieAuth_SessvalField
+
+ # Cookie_Auth_CookieName: If this option is set, only the cookie with this name is searched.
+ # If it is not set, this module will search all cookies the browser sends and checks the name
+ # against the values in the field set with CookieAuth_SessvalField.
+ # REQUIRED: No
+ # Options: <name>
+ #CookieAuth_CookieName
+
+ # Cookie_Auth_ExpiryField: When this option is set, the current time of the webserver is
+ # compared against this field in the database. This value is in the format of a Unix
+ # timestamp (time in seconds since 01-01-1970)
+ # REQUIRED: No
+ # Options: <fieldname>
+ #CookieAuth_ExpiryField
+
+ # CookieAuth_RemoteIPField: When this option is set, the remote address of the connected
+ # client is checked against this field. Only when the remote IP and the stored IP are
+ # equal will the client be able to authorize.
+ # REQUIRED: No
+ # Options: <fieldname>
+ #CookieAuth_RemoteIPField
+
+ # CookieAuth_FailureURL: Normally, when the authorization fails the client gets an
+ # "AUTHORIZATION REQUIRED" message from the webserver. With this option set you can
+ # redirect the client to another URL.
+ #
+ # WARNING: This is a normal redirect for the browser. If you want an internal
+ # redirect where the browser doesn't see the URL it's been redirected to
+ # you should use the ErrorDocument directive. Example:
+ # "ErrorDocument 401 /some_error.html"
+ #
+ # REQUIRED: No
+ # Options: <url>
+ #CookieAuth_FailureURL
+#</Directory>
+</IfDefine>
+
+# vim: ts=4 filetype=apache
diff --git a/www-apache/mod_auth_cookie_mysql2/metadata.xml b/www-apache/mod_auth_cookie_mysql2/metadata.xml
new file mode 100644
index 000000000000..1289a22383f2
--- /dev/null
+++ b/www-apache/mod_auth_cookie_mysql2/metadata.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>maintainer-needed@gentoo.org</email>
+ </maintainer>
+</pkgmetadata>
diff --git a/www-apache/mod_auth_cookie_mysql2/mod_auth_cookie_mysql2-1.0.ebuild b/www-apache/mod_auth_cookie_mysql2/mod_auth_cookie_mysql2-1.0.ebuild
new file mode 100644
index 000000000000..3f857ec4c30f
--- /dev/null
+++ b/www-apache/mod_auth_cookie_mysql2/mod_auth_cookie_mysql2-1.0.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit apache-module
+
+DESCRIPTION="An Apache2 backend authentication module that uses cookies and MySQL"
+HOMEPAGE="http://home.digithi.de/digithi/dev/mod_auth_cookie_mysql/"
+SRC_URI="http://home.digithi.de/digithi/dev/mod_auth_cookie_mysql/${P/-/_}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="virtual/mysql"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${P/-/_}"
+
+APXS2_ARGS="-DMODULE_NAME=mod_auth_cookie_mysql2 -DMODULE_NAME_module=auth_cookie_mysql2_module
+ -I/usr/include/mysql -lmysqlclient -lz -c mod_auth_cookie_sql2.c mod_auth_cookie_sql2_mysql.c"
+APACHE2_MOD_FILE="${S}/.libs/mod_auth_cookie_sql2.so"
+APACHE2_MOD_CONF="55_${PN}"
+APACHE2_MOD_DEFINE="AUTH_COOKIE_MYSQL2"
+
+DOCFILES="README"
+
+need_apache2_2
diff --git a/www-apache/mod_auth_imap2/Manifest b/www-apache/mod_auth_imap2/Manifest
new file mode 100644
index 000000000000..c72f39db32c2
--- /dev/null
+++ b/www-apache/mod_auth_imap2/Manifest
@@ -0,0 +1 @@
+DIST mod_auth_imap2-2.2.0.tar.gz 12787 SHA256 9642a13932010b9587d7b2263f21bed29602253bac18cb6c8847385d13d3cce0
diff --git a/www-apache/mod_auth_imap2/files/10_mod_auth_imap.conf b/www-apache/mod_auth_imap2/files/10_mod_auth_imap.conf
new file mode 100644
index 000000000000..c82bf9e04518
--- /dev/null
+++ b/www-apache/mod_auth_imap2/files/10_mod_auth_imap.conf
@@ -0,0 +1,36 @@
+<IfDefine AUTH_IMAP>
+LoadModule auth_imap_module modules/mod_auth_imap.so
+
+<Directory /var/www/localhost/htdocs>
+ # For Apache 2.2 the mod_auth_basic module is now set to
+ # be authoritative, and must be disabled if other modules
+ # are used for authentication.
+ #AuthBasicAuthoritative Off
+
+ # Turn on IMAP Authentication
+ #Auth_IMAP_Enabled on
+
+ # Give a name to the authentication domain, whatever you want:
+ #AuthName "something.com"
+
+ # Only basic authentication is supported for now:
+ #AuthType Basic
+
+ # If you feel like it, restrict the users or allow all "valid-user"
+ #Require user user1 user2
+
+ # Make IMAP Authentication authoritative for this .htaccess file:
+ #Auth_IMAP_Authoritative on
+
+ # Set the IMAP Server to which you want to connect (default=localhost):
+ #Auth_IMAP_Server imap.something.com
+
+ # Set the port on which the imap server is running (default=143):
+ #Auth_IMAP_Port 143
+
+ # Turn on some extra logging (login attempts, etc.) in Apache's Error Log
+ #Auth_IMAP_Log on
+</Directory>
+</IfDefine>
+
+# vim: ts=4 filetype=apache
diff --git a/www-apache/mod_auth_imap2/metadata.xml b/www-apache/mod_auth_imap2/metadata.xml
new file mode 100644
index 000000000000..4538a68724a6
--- /dev/null
+++ b/www-apache/mod_auth_imap2/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer><email>maintainer-needed@gentoo.org</email></maintainer>
+</pkgmetadata>
diff --git a/www-apache/mod_auth_imap2/mod_auth_imap2-2.2.0.ebuild b/www-apache/mod_auth_imap2/mod_auth_imap2-2.2.0.ebuild
new file mode 100644
index 000000000000..aa36c707af83
--- /dev/null
+++ b/www-apache/mod_auth_imap2/mod_auth_imap2-2.2.0.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit apache-module
+
+MY_PN="${PN/imap2/imap}"
+KEYWORDS="~amd64 ~x86"
+
+DESCRIPTION="An Apache2 module to provide authentication via an IMAP Mail server"
+HOMEPAGE="http://ben.brillat.net/projects/mod_auth_imap/"
+SRC_URI="http://ben.brillat.net/files/projects/${PN}/${P}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+IUSE=""
+
+DEPEND=""
+RDEPEND=""
+
+APXS2_ARGS="-c ${MY_PN}.c"
+
+APACHE2_MOD_CONF="10_${MY_PN}"
+APACHE2_MOD_DEFINE="AUTH_IMAP"
+APACHE2_MOD_FILE=".libs/${MY_PN}.so"
+
+DOCFILES="CHANGELOG README examples/*"
+
+need_apache2
diff --git a/www-apache/mod_auth_kerb/Manifest b/www-apache/mod_auth_kerb/Manifest
new file mode 100644
index 000000000000..8d1c98a88e90
--- /dev/null
+++ b/www-apache/mod_auth_kerb/Manifest
@@ -0,0 +1,2 @@
+DIST mod_auth_kerb-5.3.tar.gz 73530 SHA256 89cd779a94405521770cbcb169af5af61e7f2aad91c4f4b82efaae35df7595ec
+DIST mod_auth_kerb-5.4.tar.gz 93033 SHA256 690ddd66c6d941e2fa2dada46588329a6f57d0a3b9b2fd9bf055ebc427558265 SHA512 93fdf0e43af1c24e8c8204d09240b708747068ef99dd8d21b45cb4d132d31e6d582d49ea5e23b905f55cb0d4a20b1ecb58de1bcbfdad1d016e536fc622b63214 WHIRLPOOL 1b92217b7cf66d731a72cf9d58f188002ccadd75fc3d9075290347e6b4f1511111d3cff147fab73616951cbdb9430e8038adf5c4e204d374886bec3be69ff51c
diff --git a/www-apache/mod_auth_kerb/files/11_mod_auth_kerb.conf b/www-apache/mod_auth_kerb/files/11_mod_auth_kerb.conf
new file mode 100644
index 000000000000..e567274c7707
--- /dev/null
+++ b/www-apache/mod_auth_kerb/files/11_mod_auth_kerb.conf
@@ -0,0 +1,14 @@
+<IfDefine AUTH_KERB>
+LoadModule auth_kerb_module modules/mod_auth_kerb.so
+
+<Directory "/var/www/private">
+ AuthType Kerberos
+ AuthName "Kerberos Login"
+ # See the INSTALL file about howto create the keytab
+ Krb5Keytab conf/apache.keytab
+ KrbAuthRealms EXAMPLE.COM
+ Require valid-user
+</Directory>
+</IfDefine>
+
+# vim: ts=4 filetype=apache
diff --git a/www-apache/mod_auth_kerb/files/mod_auth_kerb-5.4-cachedir.patch b/www-apache/mod_auth_kerb/files/mod_auth_kerb-5.4-cachedir.patch
new file mode 100644
index 000000000000..ebc435824c4b
--- /dev/null
+++ b/www-apache/mod_auth_kerb/files/mod_auth_kerb-5.4-cachedir.patch
@@ -0,0 +1,15 @@
+
+Per https://bugzilla.redhat.com//show_bug.cgi?id=796430
+switch the cache dir to be relative to runtimedir.
+
+--- mod_auth_kerb-5.4/src/mod_auth_kerb.c.cachedir
++++ mod_auth_kerb-5.4/src/mod_auth_kerb.c
+@@ -891,7 +891,7 @@ create_krb5_ccache(krb5_context kcontext
+ int ret;
+ krb5_ccache tmp_ccache = NULL;
+
+- ccname = apr_psprintf(r->connection->pool, "FILE:%s/krb5cc_apache_XXXXXX", P_tmpdir);
++ ccname = apr_pstrdup(r->connection->pool, "FILE:/run/httpd/krbcache/krb5cc_apache_XXXXXX");
+ fd = mkstemp(ccname + strlen("FILE:"));
+ if (fd < 0) {
+ log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
diff --git a/www-apache/mod_auth_kerb/files/mod_auth_kerb-5.4-delegation.patch b/www-apache/mod_auth_kerb/files/mod_auth_kerb-5.4-delegation.patch
new file mode 100644
index 000000000000..a01e9f21e435
--- /dev/null
+++ b/www-apache/mod_auth_kerb/files/mod_auth_kerb-5.4-delegation.patch
@@ -0,0 +1,68 @@
+
+https://bugzilla.redhat.com/show_bug.cgi?id=688210
+
+--- mod_auth_kerb-5.4/src/mod_auth_kerb.c.delegation
++++ mod_auth_kerb-5.4/src/mod_auth_kerb.c
+@@ -209,6 +209,7 @@ typedef struct krb5_conn_data {
+ char *authline;
+ char *user;
+ char *mech;
++ char *ccname;
+ int last_return;
+ } krb5_conn_data;
+
+@@ -875,7 +876,7 @@ create_krb5_ccache(krb5_context kcontext
+ int ret;
+ krb5_ccache tmp_ccache = NULL;
+
+- ccname = apr_psprintf(r->pool, "FILE:%s/krb5cc_apache_XXXXXX", P_tmpdir);
++ ccname = apr_psprintf(r->connection->pool, "FILE:%s/krb5cc_apache_XXXXXX", P_tmpdir);
+ fd = mkstemp(ccname + strlen("FILE:"));
+ if (fd < 0) {
+ log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
+@@ -905,7 +906,7 @@ create_krb5_ccache(krb5_context kcontext
+ }
+
+ apr_table_setn(r->subprocess_env, "KRB5CCNAME", ccname);
+- apr_pool_cleanup_register(r->pool, ccname, krb5_cache_cleanup,
++ apr_pool_cleanup_register(r->connection->pool, ccname, krb5_cache_cleanup,
+ apr_pool_cleanup_null);
+
+ *ccache = tmp_ccache;
+@@ -1866,10 +1868,15 @@ already_succeeded(request_rec *r, char *
+ if (apr_pool_userdata_get((void**)&conn_data, keyname, r->connection->pool) != 0)
+ return NULL;
+
+- if(conn_data) {
+- if(strcmp(conn_data->authline, auth_line) == 0) {
+- log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, "matched previous auth request");
+- return conn_data;
++ if(conn_data && conn_data->ccname != NULL) {
++ apr_finfo_t finfo;
++
++ if (apr_stat(&finfo, conn_data->ccname + strlen("FILE:"),
++ APR_FINFO_NORM, r->pool) == APR_SUCCESS
++ && (finfo.valid & APR_FINFO_TYPE)
++ && finfo.filetype == APR_REG) {
++ log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, "matched previous auth request");
++ return conn_data;
+ }
+ }
+ return NULL;
+@@ -2001,6 +2008,8 @@ kerb_authenticate_user(request_rec *r)
+ ret = prevauth->last_return;
+ MK_USER = prevauth->user;
+ MK_AUTH_TYPE = prevauth->mech;
++ if (prevauth->ccname)
++ apr_table_setn(r->subprocess_env, "KRB5CCNAME", prevauth->ccname);
+ }
+
+ /*
+@@ -2011,6 +2020,7 @@ kerb_authenticate_user(request_rec *r)
+ prevauth->user = apr_pstrdup(r->connection->pool, MK_USER);
+ prevauth->authline = apr_pstrdup(r->connection->pool, auth_line);
+ prevauth->mech = apr_pstrdup(r->connection->pool, auth_type);
++ prevauth->ccname = apr_pstrdup(r->connection->pool, apr_table_get(r->subprocess_env, "KRB5CCNAME"));
+ prevauth->last_return = ret;
+ snprintf(keyname, sizeof(keyname) - 1,
+ "mod_auth_kerb::connection::%s::%ld",
diff --git a/www-apache/mod_auth_kerb/files/mod_auth_kerb-5.4-fixes.patch b/www-apache/mod_auth_kerb/files/mod_auth_kerb-5.4-fixes.patch
new file mode 100644
index 000000000000..b86be697ae06
--- /dev/null
+++ b/www-apache/mod_auth_kerb/files/mod_auth_kerb-5.4-fixes.patch
@@ -0,0 +1,40 @@
+
+Compiler warning fixes.
+
+--- mod_auth_kerb-5.4/src/mod_auth_kerb.c.fixes
++++ mod_auth_kerb-5.4/src/mod_auth_kerb.c
+@@ -677,7 +677,8 @@ end:
+ static krb5_error_code
+ verify_krb5_user(request_rec *r, krb5_context context, krb5_principal principal,
+ const char *password, krb5_principal server,
+- krb5_keytab keytab, int krb_verify_kdc, char *krb_service_name, krb5_ccache *ccache)
++ krb5_keytab keytab, int krb_verify_kdc,
++ const char *krb_service_name, krb5_ccache *ccache)
+ {
+ krb5_creds creds;
+ krb5_get_init_creds_opt options;
+@@ -1280,6 +1281,7 @@ get_gss_creds(request_rec *r,
+ return 0;
+ }
+
++#ifndef GSSAPI_SUPPORTS_SPNEGO
+ static int
+ cmp_gss_type(gss_buffer_t token, gss_OID oid)
+ {
+@@ -1306,6 +1308,7 @@ cmp_gss_type(gss_buffer_t token, gss_OID
+
+ return memcmp(p, oid->elements, oid->length);
+ }
++#endif
+
+ static int
+ authenticate_user_gss(request_rec *r, kerb_auth_config *conf,
+@@ -1722,7 +1725,7 @@ kerb_authenticate_user(request_rec *r)
+ return ret;
+ }
+
+-int
++static int
+ have_rcache_type(const char *type)
+ {
+ krb5_error_code ret;
diff --git a/www-apache/mod_auth_kerb/files/mod_auth_kerb-5.4-handle-continue.patch b/www-apache/mod_auth_kerb/files/mod_auth_kerb-5.4-handle-continue.patch
new file mode 100644
index 000000000000..4b77a497f4ce
--- /dev/null
+++ b/www-apache/mod_auth_kerb/files/mod_auth_kerb-5.4-handle-continue.patch
@@ -0,0 +1,20 @@
+diff --git a/src/mod_auth_kerb.c b/src/mod_auth_kerb.c
+index 2aab5ee..ca81878 100644
+--- a/src/mod_auth_kerb.c
++++ b/src/mod_auth_kerb.c
+@@ -1744,7 +1744,6 @@ authenticate_user_gss(request_rec *r, kerb_auth_config *conf,
+ goto end;
+ }
+
+-#if 0
+ /* This is a _Kerberos_ module so multiple authentication rounds aren't
+ * supported. If we wanted a generic GSS authentication we would have to do
+ * some magic with exporting context etc. */
+@@ -1752,7 +1751,6 @@ authenticate_user_gss(request_rec *r, kerb_auth_config *conf,
+ ret = HTTP_UNAUTHORIZED;
+ goto end;
+ }
+-#endif
+
+ major_status = gss_display_name(&minor_status, client_name, &output_token, NULL);
+ gss_release_name(&minor_status, &client_name);
diff --git a/www-apache/mod_auth_kerb/files/mod_auth_kerb-5.4-httpd24.patch b/www-apache/mod_auth_kerb/files/mod_auth_kerb-5.4-httpd24.patch
new file mode 100644
index 000000000000..86c9b47d6bd3
--- /dev/null
+++ b/www-apache/mod_auth_kerb/files/mod_auth_kerb-5.4-httpd24.patch
@@ -0,0 +1,75 @@
+
+Fixes for 2.4 API.
+
+--- mod_auth_kerb-5.4/src/mod_auth_kerb.c.httpd24
++++ mod_auth_kerb-5.4/src/mod_auth_kerb.c
+@@ -179,6 +179,16 @@ static apr_global_mutex_t *s4u2proxy_loc
+ #define PROXYREQ_PROXY STD_PROXY
+ #endif
+
++#if MODULE_MAGIC_NUMBER_MAJOR >= 20100606
++/* 2.4.x or later */
++#define WITH_HTTPD24 1
++#define client_ip(r) ((r)->useragent_ip)
++APLOG_USE_MODULE(auth_kerb);
++#else
++#define client_ip(r) ((r)->connection->remote_ip)
++#define ap_unixd_set_global_mutex_perms unixd_set_global_mutex_perms
++#endif
++
+ /***************************************************************************
+ Auth Configuration Structure
+ ***************************************************************************/
+@@ -383,7 +393,11 @@ cmd_delegationlock(cmd_parms *cmd, void
+ }
+
+ static void
+-log_rerror(const char *file, int line, int level, int status,
++log_rerror(const char *file, int line,
++#ifdef WITH_HTTPD24
++ int module_index,
++#endif
++ int level, int status,
+ const request_rec *r, const char *fmt, ...)
+ {
+ char errstr[1024];
+@@ -394,7 +408,9 @@ log_rerror(const char *file, int line, i
+ va_end(ap);
+
+
+-#ifdef STANDARD20_MODULE_STUFF
++#if defined(WITH_HTTPD24)
++ ap_log_rerror(file, line, module_index, level, status, r, "%s", errstr);
++#elif defined(STANDARD20_MODULE_STUFF)
+ ap_log_rerror(file, line, level | APLOG_NOERRNO, status, r, "%s", errstr);
+ #else
+ ap_log_rerror(file, line, level | APLOG_NOERRNO, r, "%s", errstr);
+@@ -1860,8 +1876,8 @@ already_succeeded(request_rec *r, char *
+ char keyname[1024];
+
+ snprintf(keyname, sizeof(keyname) - 1,
+- "mod_auth_kerb::connection::%s::%ld", r->connection->remote_ip,
+- r->connection->id);
++ "mod_auth_kerb::connection::%s::%ld", client_ip(r),
++ r->connection->id);
+
+ if (apr_pool_userdata_get((void**)&conn_data, keyname, r->connection->pool) != 0)
+ return NULL;
+@@ -2014,7 +2030,7 @@ kerb_authenticate_user(request_rec *r)
+ prevauth->last_return = ret;
+ snprintf(keyname, sizeof(keyname) - 1,
+ "mod_auth_kerb::connection::%s::%ld",
+- r->connection->remote_ip, r->connection->id);
++ client_ip(r), r->connection->id);
+ apr_pool_userdata_set(prevauth, keyname, NULL, r->connection->pool);
+ }
+
+@@ -2073,7 +2089,7 @@ s4u2proxylock_create(server_rec *s, apr_
+ }
+
+ #ifdef AP_NEED_SET_MUTEX_PERMS
+- rc = unixd_set_global_mutex_perms(s4u2proxy_lock);
++ rc = ap_unixd_set_global_mutex_perms(s4u2proxy_lock);
+ if (rc != APR_SUCCESS) {
+ ap_log_error(APLOG_MARK, APLOG_CRIT, rc, s,
+ "mod_auth_kerb: Parent could not set permissions "
diff --git a/www-apache/mod_auth_kerb/files/mod_auth_kerb-5.4-longuser.patch b/www-apache/mod_auth_kerb/files/mod_auth_kerb-5.4-longuser.patch
new file mode 100644
index 000000000000..100fd364af85
--- /dev/null
+++ b/www-apache/mod_auth_kerb/files/mod_auth_kerb-5.4-longuser.patch
@@ -0,0 +1,31 @@
+
+https://bugzilla.redhat.com/show_bug.cgi?id=867153
+
+Patch by: jkaluza
+
+--- mod_auth_kerb-5.4/src/mod_auth_kerb.c.longuser
++++ mod_auth_kerb-5.4/src/mod_auth_kerb.c
+@@ -80,6 +80,7 @@
+
+ #define MECH_NEGOTIATE "Negotiate"
+ #define SERVICE_NAME "HTTP"
++#define MAX_LOCAL_USERNAME 255
+
+ #include <httpd.h>
+ #include <http_config.h>
+@@ -1815,13 +1816,13 @@ do_krb5_an_to_ln(request_rec *r) {
+ krb5_get_err_text(kcontext, code));
+ goto end;
+ }
+- MK_USER_LNAME = apr_pcalloc(r->pool, strlen(MK_USER)+1);
++ MK_USER_LNAME = apr_pcalloc(r->pool, MAX_LOCAL_USERNAME+1);
+ if (MK_USER_LNAME == NULL) {
+ log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
+ "ap_pcalloc() failed (not enough memory)");
+ goto end;
+ }
+- code = krb5_aname_to_localname(kcontext, client, strlen(MK_USER), MK_USER_LNAME);
++ code = krb5_aname_to_localname(kcontext, client, MAX_LOCAL_USERNAME, MK_USER_LNAME);
+ if (code) {
+ if (code != KRB5_LNAME_NOTRANS) {
+ log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
diff --git a/www-apache/mod_auth_kerb/files/mod_auth_kerb-5.4-rcopshack.patch b/www-apache/mod_auth_kerb/files/mod_auth_kerb-5.4-rcopshack.patch
new file mode 100644
index 000000000000..abbf4dba47b2
--- /dev/null
+++ b/www-apache/mod_auth_kerb/files/mod_auth_kerb-5.4-rcopshack.patch
@@ -0,0 +1,73 @@
+
+Remove the Krb5 1.3.x-specific hack which mucks about with
+libkrb5 internals, and shouldn't.
+
+--- mod_auth_kerb-5.4/src/mod_auth_kerb.c.rcopshack
++++ mod_auth_kerb-5.4/src/mod_auth_kerb.c
+@@ -285,34 +285,6 @@ mkstemp(char *template)
+ }
+ #endif
+
+-#if defined(KRB5) && !defined(HEIMDAL)
+-/* Needed to work around problems with replay caches */
+-#include "mit-internals.h"
+-
+-/* This is our replacement krb5_rc_store function */
+-static krb5_error_code KRB5_LIB_FUNCTION
+-mod_auth_kerb_rc_store(krb5_context context, krb5_rcache rcache,
+- krb5_donot_replay_internal *donot_replay)
+-{
+- return 0;
+-}
+-
+-/* And this is the operations vector for our replay cache */
+-const krb5_rc_ops_internal mod_auth_kerb_rc_ops = {
+- 0,
+- "dfl",
+- krb5_rc_dfl_init,
+- krb5_rc_dfl_recover,
+- krb5_rc_dfl_destroy,
+- krb5_rc_dfl_close,
+- mod_auth_kerb_rc_store,
+- krb5_rc_dfl_expunge,
+- krb5_rc_dfl_get_span,
+- krb5_rc_dfl_get_name,
+- krb5_rc_dfl_resolve
+-};
+-#endif
+-
+ /***************************************************************************
+ Auth Configuration Initialization
+ ***************************************************************************/
+@@ -1252,31 +1224,6 @@ get_gss_creds(request_rec *r,
+ return HTTP_INTERNAL_SERVER_ERROR;
+ }
+
+-#ifndef HEIMDAL
+- /*
+- * With MIT Kerberos 5 1.3.x the gss_cred_id_t is the same as
+- * krb5_gss_cred_id_t and krb5_gss_cred_id_rec contains a pointer to
+- * the replay cache.
+- * This allows us to override the replay cache function vector with
+- * our own one.
+- * Note that this is a dirty hack to get things working and there may
+- * well be unknown side-effects.
+- */
+- {
+- krb5_gss_cred_id_t gss_creds = (krb5_gss_cred_id_t) *server_creds;
+-
+- /* First we try to verify we are linked with 1.3.x to prevent from
+- crashing when linked with 1.4.x */
+- if (gss_creds && (gss_creds->usage == GSS_C_ACCEPT)) {
+- if (gss_creds->rcache && gss_creds->rcache->ops &&
+- gss_creds->rcache->ops->type &&
+- memcmp(gss_creds->rcache->ops->type, "dfl", 3) == 0)
+- /* Override the rcache operations */
+- gss_creds->rcache->ops = &mod_auth_kerb_rc_ops;
+- }
+- }
+-#endif
+-
+ return 0;
+ }
+
diff --git a/www-apache/mod_auth_kerb/files/mod_auth_kerb-5.4-s4u2proxy-r3.patch b/www-apache/mod_auth_kerb/files/mod_auth_kerb-5.4-s4u2proxy-r3.patch
new file mode 100644
index 000000000000..202b402be561
--- /dev/null
+++ b/www-apache/mod_auth_kerb/files/mod_auth_kerb-5.4-s4u2proxy-r3.patch
@@ -0,0 +1,603 @@
+
+Add S4U2Proxy feature:
+
+http://sourceforge.net/mailarchive/forum.php?thread_name=4EE665D1.3000308%40redhat.com&forum_name=modauthkerb-help
+
+The attached patches add support for using s4u2proxy
+(http://k5wiki.kerberos.org/wiki/Projects/Services4User) to allow the
+web service to obtain credentials on behalf of the authenticated user.
+
+The first patch adds basic support for s4u2proxy. This requires the web
+administrator to manually create and manage the credentails cache for
+the apache user (via a cron job, for example).
+
+The second patch builds on this and makes mod_auth_kerb manage the
+ccache instead.
+
+These are patches against the current CVS HEAD (mod_auth_krb 5.4).
+
+I've added a new module option to enable this support,
+KrbConstrainedDelegation. The default is off.
+
+--- mod_auth_kerb-5.4.orig/README 2008-11-26 11:51:05.000000000 -0500
++++ mod_auth_kerb-5.4/README 2012-01-04 11:17:22.000000000 -0500
+@@ -122,4 +122,16 @@ KrbSaveCredentials, the tickets will be
+ credential cache that will be available for the request handler. The ticket
+ file will be removed after request is handled.
+
++Constrained Delegation
++----------------------
++S4U2Proxy, or constrained delegation, enables a service to use a client's
++ticket to itself to request another ticket for delegation. The KDC
++checks krbAllowedToDelegateTo to decide if it will issue a new ticket.
++If KrbConstrainedDelegation is enabled the server will use its own credentials
++to retrieve a delegated ticket for the user. For this to work the user must
++have a forwardable ticket (though the delegation flag need not be set).
++The server needs a valid credentials cache for this to work.
++
++The module itself will obtain and manage the necessary credentials.
++
+ $Id: README,v 1.12 2008/09/17 14:01:55 baalberith Exp $
+diff -up --recursive mod_auth_kerb-5.4.orig/src/mod_auth_kerb.c mod_auth_kerb-5.4/src/mod_auth_kerb.c
+--- mod_auth_kerb-5.4.orig/src/mod_auth_kerb.c 2011-12-09 17:55:05.000000000 -0500
++++ mod_auth_kerb-5.4/src/mod_auth_kerb.c 2012-03-01 14:19:40.000000000 -0500
+@@ -42,6 +42,31 @@
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
++/*
++ * Locking mechanism inspired by mod_rewrite.
++ *
++ * Licensed to the Apache Software Foundation (ASF) under one or more
++ * contributor license agreements. See the NOTICE file distributed with
++ * this work for additional information regarding copyright ownership.
++ * The ASF licenses this file to You under the Apache License, Version 2.0
++ * (the "License"); you may not use this file except in compliance with
++ * the License. You may obtain a copy of the License at
++ *
++ * http://www.apache.org/licenses/LICENSE-2.0
++ *
++ * Unless required by applicable law or agreed to in writing, software
++ * distributed under the License is distributed on an "AS IS" BASIS,
++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++ * See the License for the specific language governing permissions and
++ * limitations under the License.
++ */
++
++/*
++ * S4U2Proxy code
++ *
++ * Copyright (C) 2012 Red Hat
++ */
++
+ #ident "$Id: mod_auth_kerb.c,v 1.150 2008/12/04 10:14:03 baalberith Exp $"
+
+ #include "config.h"
+@@ -49,6 +74,7 @@
+ #include <stdlib.h>
+ #include <stdio.h>
+ #include <stdarg.h>
++#include <unixd.h>
+
+ #define MODAUTHKERB_VERSION "5.4"
+
+@@ -122,6 +148,12 @@
+ module auth_kerb_module;
+ #endif
+
++#ifdef STANDARD20_MODULE_STUFF
++/* s4u2proxy only supported in 2.0+ */
++static const char *lockname;
++static apr_global_mutex_t *s4u2proxy_lock = NULL;
++#endif
++
+ /***************************************************************************
+ Macros To Ease Compatibility
+ ***************************************************************************/
+@@ -156,6 +188,7 @@
+ int krb_method_gssapi;
+ int krb_method_k5pass;
+ int krb5_do_auth_to_local;
++ int krb5_s4u2proxy;
+ #endif
+ #ifdef KRB4
+ char *krb_4_srvtab;
+@@ -176,6 +209,11 @@
+
+ static const char*
+ krb5_save_realms(cmd_parms *cmd, void *sec, const char *arg);
++static const char *
++cmd_delegationlock(cmd_parms *cmd, void *dconf, const char *a1);
++
++static int
++obtain_server_credentials(request_rec *r, const char *service_name);
+
+ #ifdef STANDARD20_MODULE_STUFF
+ #define command(name, func, var, type, usage) \
+@@ -228,6 +266,12 @@
+
+ command("KrbLocalUserMapping", ap_set_flag_slot, krb5_do_auth_to_local,
+ FLAG, "Set to 'on' to have Kerberos do auth_to_local mapping of principal names to system user names."),
++
++ command("KrbConstrainedDelegation", ap_set_flag_slot, krb5_s4u2proxy,
++ FLAG, "Set to 'on' to have Kerberos use S4U2Proxy delegation."),
++
++ AP_INIT_TAKE1("KrbConstrainedDelegationLock", cmd_delegationlock, NULL,
++ RSRC_CONF, "the filename of a lockfile used for inter-process synchronization"),
+ #endif
+
+ #ifdef KRB4
+@@ -293,6 +337,7 @@
+ #endif
+ #ifdef KRB5
+ ((kerb_auth_config *)rec)->krb5_do_auth_to_local = 0;
++ ((kerb_auth_config *)rec)->krb5_s4u2proxy = 0;
+ ((kerb_auth_config *)rec)->krb_method_k5pass = 1;
+ ((kerb_auth_config *)rec)->krb_method_gssapi = 1;
+ #endif
+@@ -310,6 +355,24 @@
+ return NULL;
+ }
+
++static const char *
++cmd_delegationlock(cmd_parms *cmd, void *dconf, const char *a1)
++{
++ const char *error;
++
++ if ((error = ap_check_cmd_context(cmd, GLOBAL_ONLY)) != NULL)
++ return error;
++
++ /* fixup the path, especially for s4u2proxylock_remove() */
++ lockname = ap_server_root_relative(cmd->pool, a1);
++
++ if (!lockname) {
++ return apr_pstrcat(cmd->pool, "Invalid KrbConstrainedDelegationLock path ", a1, NULL);
++ }
++
++ return NULL;
++}
++
+ static void
+ log_rerror(const char *file, int line, int level, int status,
+ const request_rec *r, const char *fmt, ...)
+@@ -1161,6 +1224,7 @@
+ gss_buffer_desc token = GSS_C_EMPTY_BUFFER;
+ OM_uint32 major_status, minor_status, minor_status2;
+ gss_name_t server_name = GSS_C_NO_NAME;
++ gss_cred_usage_t usage = GSS_C_ACCEPT;
+ char buf[1024];
+ int have_server_princ;
+
+@@ -1203,10 +1267,14 @@
+
+ log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, "Acquiring creds for %s",
+ token.value);
++ if (conf->krb5_s4u2proxy) {
++ usage = GSS_C_BOTH;
++ obtain_server_credentials(r, conf->krb_service_name);
++ }
+ gss_release_buffer(&minor_status, &token);
+
+ major_status = gss_acquire_cred(&minor_status, server_name, GSS_C_INDEFINITE,
+- GSS_C_NO_OID_SET, GSS_C_ACCEPT,
++ GSS_C_NO_OID_SET, usage,
+ server_creds, NULL, NULL);
+ gss_release_name(&minor_status2, &server_name);
+ if (GSS_ERROR(major_status)) {
+@@ -1248,6 +1316,305 @@
+ }
+ #endif
+
++/* Renew the ticket if it will expire in under a minute */
++#define RENEWAL_TIME 60
++
++/*
++ * Services4U2Proxy lets a server prinicipal request another service
++ * principal on behalf of a user. To do this the Apache service needs
++ * to have its own ccache. This will ensure that the ccache has a valid
++ * principal and will initialize or renew new credentials when needed.
++ */
++
++static int
++verify_server_credentials(request_rec *r,
++ krb5_context kcontext,
++ krb5_ccache ccache,
++ krb5_principal princ,
++ int *renew
++)
++{
++ krb5_creds match_cred;
++ krb5_creds creds;
++ char * princ_name = NULL;
++ char *tgs_princ_name = NULL;
++ krb5_timestamp now;
++ krb5_error_code kerr = 0;
++
++ *renew = 0;
++
++ memset (&match_cred, 0, sizeof(match_cred));
++ memset (&creds, 0, sizeof(creds));
++
++ if (NULL == ccache || NULL == princ) {
++ /* Nothing to verify */
++ *renew = 1;
++ goto cleanup;
++ }
++
++ if ((kerr = krb5_unparse_name(kcontext, princ, &princ_name))) {
++ log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
++ "Could not unparse principal %s (%d)",
++ error_message(kerr), kerr);
++ goto cleanup;
++ }
++
++ log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
++ "Using principal %s for s4u2proxy", princ_name);
++
++#ifdef HEIMDAL
++ tgs_princ_name = apr_psprintf(r->pool, "%s/%s@%s", KRB5_TGS_NAME,
++ krb5_principal_get_realm(kcontext, princ),
++ krb5_principal_get_realm(kcontext, princ));
++#else
++ tgs_princ_name = apr_psprintf(r->pool, "%s/%.*s@%.*s", KRB5_TGS_NAME,
++ krb5_princ_realm(kcontext, princ)->length,
++ krb5_princ_realm(kcontext, princ)->data,
++ krb5_princ_realm(kcontext, princ)->length,
++ krb5_princ_realm(kcontext, princ)->data);
++#endif
++
++ if ((kerr = krb5_parse_name(kcontext, tgs_princ_name, &match_cred.server)))
++ {
++ log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
++ "Could not parse principal %s: %s (%d)",
++ tgs_princ_name, error_message(kerr), kerr);
++ goto cleanup;
++ }
++
++ match_cred.client = princ;
++
++ if ((kerr = krb5_cc_retrieve_cred(kcontext, ccache, 0, &match_cred, &creds)))
++ {
++ krb5_unparse_name(kcontext, princ, &princ_name);
++ log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
++ "Could not unparse principal %s: %s (%d)",
++ princ_name, error_message(kerr), kerr);
++ goto cleanup;
++ }
++
++ if ((kerr = krb5_timeofday(kcontext, &now))) {
++ log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
++ "Could not get current time: %d (%s)",
++ kerr, error_message(kerr));
++ goto cleanup;
++ }
++
++ if (now > (creds.times.endtime + RENEWAL_TIME)) {
++ log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
++ "Credentials for %s have expired or will soon "
++ "expire - now %d endtime %d",
++ princ_name, now, creds.times.endtime);
++ *renew = 1;
++ } else {
++ log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
++ "Credentials for %s will expire at "
++ "%d, it is now %d", princ_name, creds.times.endtime, now);
++ }
++
++cleanup:
++ /* Closing context, ccache, etc happens elsewhere */
++ if (match_cred.server) {
++ krb5_free_principal(kcontext, match_cred.server);
++ }
++ if (creds.client) {
++ krb5_free_cred_contents(kcontext, &creds);
++ }
++
++ return kerr;
++}
++
++static int
++obtain_server_credentials(request_rec *r,
++ const char *service_name)
++{
++ krb5_context kcontext = NULL;
++ krb5_keytab keytab = NULL;
++ krb5_ccache ccache = NULL;
++ char * princ_name = NULL;
++ char *tgs_princ_name = NULL;
++ krb5_error_code kerr = 0;
++ krb5_principal princ = NULL;
++ krb5_creds creds;
++ krb5_get_init_creds_opt gicopts;
++ int renew = 0;
++ apr_status_t rv = 0;
++
++ memset(&creds, 0, sizeof(creds));
++
++ if ((kerr = krb5_init_context(&kcontext))) {
++ log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
++ "Kerberos context initialization failed: %s (%d)", error_message(kerr), kerr);
++ goto done;
++ }
++
++ if ((kerr = krb5_cc_default(kcontext, &ccache))) {
++ log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
++ "Could not get default Kerberos ccache: %s (%d)",
++ error_message(kerr), kerr);
++ goto done;
++ }
++
++ if ((kerr = krb5_cc_get_principal(kcontext, ccache, &princ))) {
++ char * name = NULL;
++
++ if ((asprintf(&name, "%s:%s", krb5_cc_get_type(kcontext, ccache),
++ krb5_cc_get_name(kcontext, ccache))) == -1) {
++ kerr = KRB5_CC_NOMEM;
++ goto done;
++ }
++
++ if (KRB5_FCC_NOFILE == kerr) {
++ log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
++ "Credentials cache %s not found, create one", name);
++ krb5_cc_close(kcontext, ccache);
++ ccache = NULL;
++ free(name);
++ } else {
++ log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
++ "Failure to open credentials cache %s: %s (%d)",
++ name, error_message(kerr), kerr);
++ free(name);
++ goto done;
++ }
++ }
++
++ kerr = verify_server_credentials(r, kcontext, ccache, princ, &renew);
++
++ if (kerr || !renew) {
++ goto done;
++ }
++
++#ifdef STANDARD20_MODULE_STUFF
++ if (s4u2proxy_lock) {
++ rv = apr_global_mutex_lock(s4u2proxy_lock);
++ if (rv != APR_SUCCESS) {
++ ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
++ "apr_global_mutex_lock(s4u2proxy_lock) "
++ "failed");
++ }
++ }
++#endif
++
++ /* We have the lock, check again to be sure another process hasn't already
++ * renewed the ticket.
++ */
++ kerr = verify_server_credentials(r, kcontext, ccache, princ, &renew);
++ if (kerr || !renew) {
++ goto unlock;
++ }
++
++ if (NULL == princ) {
++ princ_name = apr_psprintf(r->pool, "%s/%s",
++ (service_name) ? service_name : SERVICE_NAME,
++ ap_get_server_name(r));
++
++ if ((kerr = krb5_parse_name(kcontext, princ_name, &princ))) {
++ log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
++ "Could not parse principal %s: %s (%d) ",
++ princ_name, error_message(kerr), kerr);
++ goto unlock;
++ }
++ } else if (NULL == princ_name) {
++ if ((kerr = krb5_unparse_name(kcontext, princ, &princ_name))) {
++ log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
++ "Could not unparse principal %s: %s (%d)",
++ princ_name, error_message(kerr), kerr);
++ goto unlock;
++ }
++ }
++
++ if ((kerr = krb5_kt_default(kcontext, &keytab))) {
++ log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
++ "Unable to get default keytab: %s (%d)",
++ error_message(kerr), kerr);
++ goto unlock;
++ }
++
++ log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
++ "Obtaining new credentials for %s", princ_name);
++ krb5_get_init_creds_opt_init(&gicopts);
++ krb5_get_init_creds_opt_set_forwardable(&gicopts, 1);
++
++#ifdef HEIMDAL
++ tgs_princ_name = apr_psprintf(r->pool, "%s/%s@%s", KRB5_TGS_NAME,
++ krb5_principal_get_realm(kcontext, princ),
++ krb5_principal_get_realm(kcontext, princ));
++#else
++ tgs_princ_name = apr_psprintf(r->pool, "%s/%.*s@%.*s", KRB5_TGS_NAME,
++ krb5_princ_realm(kcontext, princ)->length,
++ krb5_princ_realm(kcontext, princ)->data,
++ krb5_princ_realm(kcontext, princ)->length,
++ krb5_princ_realm(kcontext, princ)->data);
++#endif
++
++ if ((kerr = krb5_get_init_creds_keytab(kcontext, &creds, princ, keytab,
++ 0, tgs_princ_name, &gicopts))) {
++ log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
++ "Failed to obtain credentials for principal %s: "
++ "%s (%d)", princ_name, error_message(kerr), kerr);
++ goto unlock;
++ }
++
++ krb5_kt_close(kcontext, keytab);
++ keytab = NULL;
++
++ if (NULL == ccache) {
++ if ((kerr = krb5_cc_default(kcontext, &ccache))) {
++ log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
++ "Failed to open default ccache: %s (%d)",
++ error_message(kerr), kerr);
++ goto unlock;
++ }
++ }
++
++ if ((kerr = krb5_cc_initialize(kcontext, ccache, princ))) {
++ log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
++ "Failed to initialize ccache for %s: %s (%d)",
++ princ_name, error_message(kerr), kerr);
++ goto unlock;
++ }
++
++ if ((kerr = krb5_cc_store_cred(kcontext, ccache, &creds))) {
++ log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
++ "Failed to store %s in ccache: %s (%d)",
++ princ_name, error_message(kerr), kerr);
++ goto unlock;
++ }
++
++unlock:
++#ifdef STANDARD20_MODULE_STUFF
++ if (s4u2proxy_lock) {
++ apr_global_mutex_unlock(s4u2proxy_lock);
++ if (rv != APR_SUCCESS) {
++ ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
++ "apr_global_mutex_unlock(s4u2proxy_lock) "
++ "failed");
++ }
++ }
++#endif
++
++done:
++ if (0 == kerr)
++ log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
++ "Done obtaining credentials for s4u2proxy");
++ else
++ log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
++ "Failed to obtain credentials for s4u2proxy");
++
++ if (creds.client) {
++ krb5_free_cred_contents(kcontext, &creds);
++ }
++ if (ccache) {
++ krb5_cc_close(kcontext, ccache);
++ }
++ if (kcontext) {
++ krb5_free_context(kcontext);
++ }
++
++ return kerr;
++}
++
+ static int
+ authenticate_user_gss(request_rec *r, kerb_auth_config *conf,
+ const char *auth_line, char **negotiate_ret_value)
+@@ -1688,10 +2055,60 @@
+ /***************************************************************************
+ Module Setup/Configuration
+ ***************************************************************************/
++#ifdef STANDARD20_MODULE_STUFF
++static apr_status_t
++s4u2proxylock_create(server_rec *s, apr_pool_t *p)
++{
++ apr_status_t rc;
++
++ /* only operate if a lockfile is used */
++ if (lockname == NULL || *(lockname) == '\0') {
++ return APR_SUCCESS;
++ }
++
++ /* create the lockfile */
++ rc = apr_global_mutex_create(&s4u2proxy_lock, lockname,
++ APR_LOCK_DEFAULT, p);
++ if (rc != APR_SUCCESS) {
++ ap_log_error(APLOG_MARK, APLOG_CRIT, rc, s,
++ "Parent could not create lock file %s", lockname);
++ return rc;
++ }
++
++#ifdef AP_NEED_SET_MUTEX_PERMS
++ rc = unixd_set_global_mutex_perms(s4u2proxy_lock);
++ if (rc != APR_SUCCESS) {
++ ap_log_error(APLOG_MARK, APLOG_CRIT, rc, s,
++ "mod_auth_kerb: Parent could not set permissions "
++ "on lock; check User and Group directives");
++ return rc;
++ }
++#endif
++
++ return APR_SUCCESS;
++}
++
++static apr_status_t
++s4u2proxylock_remove(void *unused)
++{
++ /* only operate if a lockfile is used */
++ if (lockname == NULL || *(lockname) == '\0') {
++ return APR_SUCCESS;
++ }
++
++ /* destroy the rewritelock */
++ apr_global_mutex_destroy(s4u2proxy_lock);
++ s4u2proxy_lock = NULL;
++ lockname = NULL;
++ return APR_SUCCESS;
++}
++#endif
++
+ #ifndef STANDARD20_MODULE_STUFF
+ static void
+ kerb_module_init(server_rec *dummy, pool *p)
+ {
++ apr_status_t status;
+ #ifndef HEIMDAL
+ /* Suppress the MIT replay cache. Requires MIT Kerberos 1.4.0 or later.
+ 1.3.x are covered by the hack overiding the replay calls */
+@@ -1732,6 +2149,7 @@
+ kerb_init_handler(apr_pool_t *p, apr_pool_t *plog,
+ apr_pool_t *ptemp, server_rec *s)
+ {
++ apr_status_t rv;
+ ap_add_version_component(p, "mod_auth_kerb/" MODAUTHKERB_VERSION);
+ #ifndef HEIMDAL
+ /* Suppress the MIT replay cache. Requires MIT Kerberos 1.4.0 or later.
+@@ -1739,14 +2157,41 @@
+ if (getenv("KRB5RCACHETYPE") == NULL && have_rcache_type("none"))
+ putenv(strdup("KRB5RCACHETYPE=none"));
+ #endif
++#ifdef STANDARD20_MODULE_STUFF
++ rv = s4u2proxylock_create(s, p);
++ if (rv != APR_SUCCESS) {
++ return HTTP_INTERNAL_SERVER_ERROR;
++ }
++
++ apr_pool_cleanup_register(p, (void *)s, s4u2proxylock_remove,
++ apr_pool_cleanup_null);
++#endif
+
+ return OK;
+ }
+
+ static void
++initialize_child(apr_pool_t *p, server_rec *s)
++{
++ apr_status_t rv = 0;
++
++#ifdef STANDARD20_MODULE_STUFF
++ if (lockname != NULL && *(lockname) != '\0') {
++ rv = apr_global_mutex_child_init(&s4u2proxy_lock, lockname, p);
++ if (rv != APR_SUCCESS) {
++ ap_log_error(APLOG_MARK, APLOG_CRIT, rv, s,
++ "mod_auth_kerb: could not init s4u2proxy_lock"
++ " in child");
++ }
++ }
++#endif
++}
++
++static void
+ kerb_register_hooks(apr_pool_t *p)
+ {
+ ap_hook_post_config(kerb_init_handler, NULL, NULL, APR_HOOK_MIDDLE);
++ ap_hook_child_init(initialize_child, NULL, NULL, APR_HOOK_MIDDLE);
+ ap_hook_check_user_id(kerb_authenticate_user, NULL, NULL, APR_HOOK_MIDDLE);
+ }
+
diff --git a/www-apache/mod_auth_kerb/files/mod_auth_kerb-5.4-s4u2proxy.patch b/www-apache/mod_auth_kerb/files/mod_auth_kerb-5.4-s4u2proxy.patch
new file mode 100644
index 000000000000..eb136000ac2b
--- /dev/null
+++ b/www-apache/mod_auth_kerb/files/mod_auth_kerb-5.4-s4u2proxy.patch
@@ -0,0 +1,591 @@
+
+Add S4U2Proxy feature:
+
+http://sourceforge.net/mailarchive/forum.php?thread_name=4EE665D1.3000308%40redhat.com&forum_name=modauthkerb-help
+
+The attached patches add support for using s4u2proxy
+(http://k5wiki.kerberos.org/wiki/Projects/Services4User) to allow the
+web service to obtain credentials on behalf of the authenticated user.
+
+The first patch adds basic support for s4u2proxy. This requires the web
+administrator to manually create and manage the credentails cache for
+the apache user (via a cron job, for example).
+
+The second patch builds on this and makes mod_auth_kerb manage the
+ccache instead.
+
+These are patches against the current CVS HEAD (mod_auth_krb 5.4).
+
+I've added a new module option to enable this support,
+KrbConstrainedDelegation. The default is off.
+
+--- mod_auth_kerb-5.4.orig/README 2008-11-26 11:51:05.000000000 -0500
++++ mod_auth_kerb-5.4/README 2012-01-04 11:17:22.000000000 -0500
+@@ -122,4 +122,16 @@ KrbSaveCredentials, the tickets will be
+ credential cache that will be available for the request handler. The ticket
+ file will be removed after request is handled.
+
++Constrained Delegation
++----------------------
++S4U2Proxy, or constrained delegation, enables a service to use a client's
++ticket to itself to request another ticket for delegation. The KDC
++checks krbAllowedToDelegateTo to decide if it will issue a new ticket.
++If KrbConstrainedDelegation is enabled the server will use its own credentials
++to retrieve a delegated ticket for the user. For this to work the user must
++have a forwardable ticket (though the delegation flag need not be set).
++The server needs a valid credentials cache for this to work.
++
++The module itself will obtain and manage the necessary credentials.
++
+ $Id$
+diff -up --recursive mod_auth_kerb-5.4.orig/src/mod_auth_kerb.c mod_auth_kerb-5.4/src/mod_auth_kerb.c
+--- mod_auth_kerb-5.4.orig/src/mod_auth_kerb.c 2011-12-09 17:55:05.000000000 -0500
++++ mod_auth_kerb-5.4/src/mod_auth_kerb.c 2012-03-01 14:19:40.000000000 -0500
+@@ -42,6 +42,31 @@
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
++/*
++ * Locking mechanism inspired by mod_rewrite.
++ *
++ * Licensed to the Apache Software Foundation (ASF) under one or more
++ * contributor license agreements. See the NOTICE file distributed with
++ * this work for additional information regarding copyright ownership.
++ * The ASF licenses this file to You under the Apache License, Version 2.0
++ * (the "License"); you may not use this file except in compliance with
++ * the License. You may obtain a copy of the License at
++ *
++ * http://www.apache.org/licenses/LICENSE-2.0
++ *
++ * Unless required by applicable law or agreed to in writing, software
++ * distributed under the License is distributed on an "AS IS" BASIS,
++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++ * See the License for the specific language governing permissions and
++ * limitations under the License.
++ */
++
++/*
++ * S4U2Proxy code
++ *
++ * Copyright (C) 2012 Red Hat
++ */
++
+ #ident "$Id$"
+
+ #include "config.h"
+@@ -49,6 +74,7 @@
+ #include <stdlib.h>
+ #include <stdio.h>
+ #include <stdarg.h>
++#include <unixd.h>
+
+ #define MODAUTHKERB_VERSION "5.4"
+
+@@ -131,6 +157,12 @@ module AP_MODULE_DECLARE_DATA auth_kerb_
+ module auth_kerb_module;
+ #endif
+
++#ifdef STANDARD20_MODULE_STUFF
++/* s4u2proxy only supported in 2.0+ */
++static const char *lockname;
++static apr_global_mutex_t *s4u2proxy_lock = NULL;
++#endif
++
+ /***************************************************************************
+ Macros To Ease Compatibility
+ ***************************************************************************/
+@@ -165,6 +197,7 @@ typedef struct {
+ int krb_method_gssapi;
+ int krb_method_k5pass;
+ int krb5_do_auth_to_local;
++ int krb5_s4u2proxy;
+ #endif
+ #ifdef KRB4
+ char *krb_4_srvtab;
+@@ -185,6 +218,11 @@ set_kerb_auth_headers(request_rec *r, co
+
+ static const char*
+ krb5_save_realms(cmd_parms *cmd, void *sec, const char *arg);
++static const char *
++cmd_delegationlock(cmd_parms *cmd, void *dconf, const char *a1);
++
++static int
++obtain_server_credentials(request_rec *r, const char *service_name);
+
+ #ifdef STANDARD20_MODULE_STUFF
+ #define command(name, func, var, type, usage) \
+@@ -237,6 +275,12 @@ static const command_rec kerb_auth_cmds[
+
+ command("KrbLocalUserMapping", ap_set_flag_slot, krb5_do_auth_to_local,
+ FLAG, "Set to 'on' to have Kerberos do auth_to_local mapping of principal names to system user names."),
++
++ command("KrbConstrainedDelegation", ap_set_flag_slot, krb5_s4u2proxy,
++ FLAG, "Set to 'on' to have Kerberos use S4U2Proxy delegation."),
++
++ AP_INIT_TAKE1("KrbConstrainedDelegationLock", cmd_delegationlock, NULL,
++ RSRC_CONF, "the filename of a lockfile used for inter-process synchronization"),
+ #endif
+
+ #ifdef KRB4
+@@ -302,6 +346,7 @@ static void *kerb_dir_create_config(MK_P
+ #endif
+ #ifdef KRB5
+ ((kerb_auth_config *)rec)->krb5_do_auth_to_local = 0;
++ ((kerb_auth_config *)rec)->krb5_s4u2proxy = 0;
+ ((kerb_auth_config *)rec)->krb_method_k5pass = 1;
+ ((kerb_auth_config *)rec)->krb_method_gssapi = 1;
+ #endif
+@@ -319,6 +364,24 @@ krb5_save_realms(cmd_parms *cmd, void *v
+ return NULL;
+ }
+
++static const char *
++cmd_delegationlock(cmd_parms *cmd, void *dconf, const char *a1)
++{
++ const char *error;
++
++ if ((error = ap_check_cmd_context(cmd, GLOBAL_ONLY)) != NULL)
++ return error;
++
++ /* fixup the path, especially for s4u2proxylock_remove() */
++ lockname = ap_server_root_relative(cmd->pool, a1);
++
++ if (!lockname) {
++ return apr_pstrcat(cmd->pool, "Invalid KrbConstrainedDelegationLock path ", a1, NULL);
++ }
++
++ return NULL;
++}
++
+ static void
+ log_rerror(const char *file, int line, int level, int status,
+ const request_rec *r, const char *fmt, ...)
+@@ -1170,6 +1233,7 @@ get_gss_creds(request_rec *r,
+ gss_buffer_desc token = GSS_C_EMPTY_BUFFER;
+ OM_uint32 major_status, minor_status, minor_status2;
+ gss_name_t server_name = GSS_C_NO_NAME;
++ gss_cred_usage_t usage = GSS_C_ACCEPT;
+ char buf[1024];
+ int have_server_princ;
+
+@@ -1212,10 +1276,14 @@ get_gss_creds(request_rec *r,
+
+ log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, "Acquiring creds for %s",
+ token.value);
++ if (conf->krb5_s4u2proxy) {
++ usage = GSS_C_BOTH;
++ obtain_server_credentials(r, conf->krb_service_name);
++ }
+ gss_release_buffer(&minor_status, &token);
+
+ major_status = gss_acquire_cred(&minor_status, server_name, GSS_C_INDEFINITE,
+- GSS_C_NO_OID_SET, GSS_C_ACCEPT,
++ GSS_C_NO_OID_SET, usage,
+ server_creds, NULL, NULL);
+ gss_release_name(&minor_status2, &server_name);
+ if (GSS_ERROR(major_status)) {
+@@ -1257,6 +1325,293 @@ cmp_gss_type(gss_buffer_t token, gss_OID
+ }
+ #endif
+
++/* Renew the ticket if it will expire in under a minute */
++#define RENEWAL_TIME 60
++
++/*
++ * Services4U2Proxy lets a server prinicipal request another service
++ * principal on behalf of a user. To do this the Apache service needs
++ * to have its own ccache. This will ensure that the ccache has a valid
++ * principal and will initialize or renew new credentials when needed.
++ */
++
++static int
++verify_server_credentials(request_rec *r,
++ krb5_context kcontext,
++ krb5_ccache ccache,
++ krb5_principal princ,
++ int *renew
++)
++{
++ krb5_creds match_cred;
++ krb5_creds creds;
++ char * princ_name = NULL;
++ char *tgs_princ_name = NULL;
++ krb5_timestamp now;
++ krb5_error_code kerr = 0;
++
++ *renew = 0;
++
++ memset (&match_cred, 0, sizeof(match_cred));
++ memset (&creds, 0, sizeof(creds));
++
++ if (NULL == ccache || NULL == princ) {
++ /* Nothing to verify */
++ *renew = 1;
++ goto cleanup;
++ }
++
++ if ((kerr = krb5_unparse_name(kcontext, princ, &princ_name))) {
++ log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
++ "Could not unparse principal %s (%d)",
++ error_message(kerr), kerr);
++ goto cleanup;
++ }
++
++ log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
++ "Using principal %s for s4u2proxy", princ_name);
++
++ tgs_princ_name = apr_psprintf(r->pool, "%s/%.*s@%.*s", KRB5_TGS_NAME,
++ krb5_princ_realm(kcontext, princ)->length,
++ krb5_princ_realm(kcontext, princ)->data,
++ krb5_princ_realm(kcontext, princ)->length,
++ krb5_princ_realm(kcontext, princ)->data);
++
++ if ((kerr = krb5_parse_name(kcontext, tgs_princ_name, &match_cred.server)))
++ {
++ log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
++ "Could not parse principal %s: %s (%d)",
++ tgs_princ_name, error_message(kerr), kerr);
++ goto cleanup;
++ }
++
++ match_cred.client = princ;
++
++ if ((kerr = krb5_cc_retrieve_cred(kcontext, ccache, 0, &match_cred, &creds)))
++ {
++ krb5_unparse_name(kcontext, princ, &princ_name);
++ log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
++ "Could not unparse principal %s: %s (%d)",
++ princ_name, error_message(kerr), kerr);
++ goto cleanup;
++ }
++
++ if ((kerr = krb5_timeofday(kcontext, &now))) {
++ log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
++ "Could not get current time: %d (%s)",
++ kerr, error_message(kerr));
++ goto cleanup;
++ }
++
++ if (now > (creds.times.endtime + RENEWAL_TIME)) {
++ log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
++ "Credentials for %s have expired or will soon "
++ "expire - now %d endtime %d",
++ princ_name, now, creds.times.endtime);
++ *renew = 1;
++ } else {
++ log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
++ "Credentials for %s will expire at "
++ "%d, it is now %d", princ_name, creds.times.endtime, now);
++ }
++
++cleanup:
++ /* Closing context, ccache, etc happens elsewhere */
++ if (match_cred.server) {
++ krb5_free_principal(kcontext, match_cred.server);
++ }
++ if (creds.client) {
++ krb5_free_cred_contents(kcontext, &creds);
++ }
++
++ return kerr;
++}
++
++static int
++obtain_server_credentials(request_rec *r,
++ const char *service_name)
++{
++ krb5_context kcontext = NULL;
++ krb5_keytab keytab = NULL;
++ krb5_ccache ccache = NULL;
++ char * princ_name = NULL;
++ char *tgs_princ_name = NULL;
++ krb5_error_code kerr = 0;
++ krb5_principal princ = NULL;
++ krb5_creds creds;
++ krb5_get_init_creds_opt gicopts;
++ int renew = 0;
++ apr_status_t rv = 0;
++
++ memset(&creds, 0, sizeof(creds));
++
++ if ((kerr = krb5_init_context(&kcontext))) {
++ log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
++ "Kerberos context initialization failed: %s (%d)", error_message(kerr), kerr);
++ goto done;
++ }
++
++ if ((kerr = krb5_cc_default(kcontext, &ccache))) {
++ log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
++ "Could not get default Kerberos ccache: %s (%d)",
++ error_message(kerr), kerr);
++ goto done;
++ }
++
++ if ((kerr = krb5_cc_get_principal(kcontext, ccache, &princ))) {
++ char * name = NULL;
++
++ if ((asprintf(&name, "%s:%s", krb5_cc_get_type(kcontext, ccache),
++ krb5_cc_get_name(kcontext, ccache))) == -1) {
++ kerr = KRB5_CC_NOMEM;
++ goto done;
++ }
++
++ if (KRB5_FCC_NOFILE == kerr) {
++ log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
++ "Credentials cache %s not found, create one", name);
++ krb5_cc_close(kcontext, ccache);
++ ccache = NULL;
++ free(name);
++ } else {
++ log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
++ "Failure to open credentials cache %s: %s (%d)",
++ name, error_message(kerr), kerr);
++ free(name);
++ goto done;
++ }
++ }
++
++ kerr = verify_server_credentials(r, kcontext, ccache, princ, &renew);
++
++ if (kerr || !renew) {
++ goto done;
++ }
++
++#ifdef STANDARD20_MODULE_STUFF
++ if (s4u2proxy_lock) {
++ rv = apr_global_mutex_lock(s4u2proxy_lock);
++ if (rv != APR_SUCCESS) {
++ ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
++ "apr_global_mutex_lock(s4u2proxy_lock) "
++ "failed");
++ }
++ }
++#endif
++
++ /* We have the lock, check again to be sure another process hasn't already
++ * renewed the ticket.
++ */
++ kerr = verify_server_credentials(r, kcontext, ccache, princ, &renew);
++ if (kerr || !renew) {
++ goto unlock;
++ }
++
++ if (NULL == princ) {
++ princ_name = apr_psprintf(r->pool, "%s/%s",
++ (service_name) ? service_name : SERVICE_NAME,
++ ap_get_server_name(r));
++
++ if ((kerr = krb5_parse_name(kcontext, princ_name, &princ))) {
++ log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
++ "Could not parse principal %s: %s (%d) ",
++ princ_name, error_message(kerr), kerr);
++ goto unlock;
++ }
++ } else if (NULL == princ_name) {
++ if ((kerr = krb5_unparse_name(kcontext, princ, &princ_name))) {
++ log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
++ "Could not unparse principal %s: %s (%d)",
++ princ_name, error_message(kerr), kerr);
++ goto unlock;
++ }
++ }
++
++ if ((kerr = krb5_kt_default(kcontext, &keytab))) {
++ log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
++ "Unable to get default keytab: %s (%d)",
++ error_message(kerr), kerr);
++ goto unlock;
++ }
++
++ log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
++ "Obtaining new credentials for %s", princ_name);
++ krb5_get_init_creds_opt_init(&gicopts);
++ krb5_get_init_creds_opt_set_forwardable(&gicopts, 1);
++
++ tgs_princ_name = apr_psprintf(r->pool, "%s/%.*s@%.*s", KRB5_TGS_NAME,
++ krb5_princ_realm(kcontext, princ)->length,
++ krb5_princ_realm(kcontext, princ)->data,
++ krb5_princ_realm(kcontext, princ)->length,
++ krb5_princ_realm(kcontext, princ)->data);
++
++ if ((kerr = krb5_get_init_creds_keytab(kcontext, &creds, princ, keytab,
++ 0, tgs_princ_name, &gicopts))) {
++ log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
++ "Failed to obtain credentials for principal %s: "
++ "%s (%d)", princ_name, error_message(kerr), kerr);
++ goto unlock;
++ }
++
++ krb5_kt_close(kcontext, keytab);
++ keytab = NULL;
++
++ if (NULL == ccache) {
++ if ((kerr = krb5_cc_default(kcontext, &ccache))) {
++ log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
++ "Failed to open default ccache: %s (%d)",
++ error_message(kerr), kerr);
++ goto unlock;
++ }
++ }
++
++ if ((kerr = krb5_cc_initialize(kcontext, ccache, princ))) {
++ log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
++ "Failed to initialize ccache for %s: %s (%d)",
++ princ_name, error_message(kerr), kerr);
++ goto unlock;
++ }
++
++ if ((kerr = krb5_cc_store_cred(kcontext, ccache, &creds))) {
++ log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
++ "Failed to store %s in ccache: %s (%d)",
++ princ_name, error_message(kerr), kerr);
++ goto unlock;
++ }
++
++unlock:
++#ifdef STANDARD20_MODULE_STUFF
++ if (s4u2proxy_lock) {
++ apr_global_mutex_unlock(s4u2proxy_lock);
++ if (rv != APR_SUCCESS) {
++ ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
++ "apr_global_mutex_unlock(s4u2proxy_lock) "
++ "failed");
++ }
++ }
++#endif
++
++done:
++ if (0 == kerr)
++ log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
++ "Done obtaining credentials for s4u2proxy");
++ else
++ log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
++ "Failed to obtain credentials for s4u2proxy");
++
++ if (creds.client) {
++ krb5_free_cred_contents(kcontext, &creds);
++ }
++ if (ccache) {
++ krb5_cc_close(kcontext, ccache);
++ }
++ if (kcontext) {
++ krb5_free_context(kcontext);
++ }
++
++ return kerr;
++}
++
+ static int
+ authenticate_user_gss(request_rec *r, kerb_auth_config *conf,
+ const char *auth_line, char **negotiate_ret_value)
+@@ -1697,10 +2052,60 @@ have_rcache_type(const char *type)
+ /***************************************************************************
+ Module Setup/Configuration
+ ***************************************************************************/
++#ifdef STANDARD20_MODULE_STUFF
++static apr_status_t
++s4u2proxylock_create(server_rec *s, apr_pool_t *p)
++{
++ apr_status_t rc;
++
++ /* only operate if a lockfile is used */
++ if (lockname == NULL || *(lockname) == '\0') {
++ return APR_SUCCESS;
++ }
++
++ /* create the lockfile */
++ rc = apr_global_mutex_create(&s4u2proxy_lock, lockname,
++ APR_LOCK_DEFAULT, p);
++ if (rc != APR_SUCCESS) {
++ ap_log_error(APLOG_MARK, APLOG_CRIT, rc, s,
++ "Parent could not create lock file %s", lockname);
++ return rc;
++ }
++
++#ifdef AP_NEED_SET_MUTEX_PERMS
++ rc = unixd_set_global_mutex_perms(s4u2proxy_lock);
++ if (rc != APR_SUCCESS) {
++ ap_log_error(APLOG_MARK, APLOG_CRIT, rc, s,
++ "mod_auth_kerb: Parent could not set permissions "
++ "on lock; check User and Group directives");
++ return rc;
++ }
++#endif
++
++ return APR_SUCCESS;
++}
++
++static apr_status_t
++s4u2proxylock_remove(void *unused)
++{
++ /* only operate if a lockfile is used */
++ if (lockname == NULL || *(lockname) == '\0') {
++ return APR_SUCCESS;
++ }
++
++ /* destroy the rewritelock */
++ apr_global_mutex_destroy(s4u2proxy_lock);
++ s4u2proxy_lock = NULL;
++ lockname = NULL;
++ return APR_SUCCESS;
++}
++#endif
++
+ #ifndef STANDARD20_MODULE_STUFF
+ static void
+ kerb_module_init(server_rec *dummy, pool *p)
+ {
++ apr_status_t status;
+ #ifndef HEIMDAL
+ /* Suppress the MIT replay cache. Requires MIT Kerberos 1.4.0 or later.
+ 1.3.x are covered by the hack overiding the replay calls */
+@@ -1741,6 +2146,7 @@ static int
+ kerb_init_handler(apr_pool_t *p, apr_pool_t *plog,
+ apr_pool_t *ptemp, server_rec *s)
+ {
++ apr_status_t rv;
+ ap_add_version_component(p, "mod_auth_kerb/" MODAUTHKERB_VERSION);
+ #ifndef HEIMDAL
+ /* Suppress the MIT replay cache. Requires MIT Kerberos 1.4.0 or later.
+@@ -1748,14 +2154,41 @@ kerb_init_handler(apr_pool_t *p, apr_poo
+ if (getenv("KRB5RCACHETYPE") == NULL && have_rcache_type("none"))
+ putenv(strdup("KRB5RCACHETYPE=none"));
+ #endif
++#ifdef STANDARD20_MODULE_STUFF
++ rv = s4u2proxylock_create(s, p);
++ if (rv != APR_SUCCESS) {
++ return HTTP_INTERNAL_SERVER_ERROR;
++ }
++
++ apr_pool_cleanup_register(p, (void *)s, s4u2proxylock_remove,
++ apr_pool_cleanup_null);
++#endif
+
+ return OK;
+ }
+
+ static void
++initialize_child(apr_pool_t *p, server_rec *s)
++{
++ apr_status_t rv = 0;
++
++#ifdef STANDARD20_MODULE_STUFF
++ if (lockname != NULL && *(lockname) != '\0') {
++ rv = apr_global_mutex_child_init(&s4u2proxy_lock, lockname, p);
++ if (rv != APR_SUCCESS) {
++ ap_log_error(APLOG_MARK, APLOG_CRIT, rv, s,
++ "mod_auth_kerb: could not init s4u2proxy_lock"
++ " in child");
++ }
++ }
++#endif
++}
++
++static void
+ kerb_register_hooks(apr_pool_t *p)
+ {
+ ap_hook_post_config(kerb_init_handler, NULL, NULL, APR_HOOK_MIDDLE);
++ ap_hook_child_init(initialize_child, NULL, NULL, APR_HOOK_MIDDLE);
+ ap_hook_check_user_id(kerb_authenticate_user, NULL, NULL, APR_HOOK_MIDDLE);
+ }
+
diff --git a/www-apache/mod_auth_kerb/files/mod_auth_kerb.conf b/www-apache/mod_auth_kerb/files/mod_auth_kerb.conf
new file mode 100644
index 000000000000..b38a0f361e4d
--- /dev/null
+++ b/www-apache/mod_auth_kerb/files/mod_auth_kerb.conf
@@ -0,0 +1 @@
+d /run/httpd/krbcache 700 apache apache
diff --git a/www-apache/mod_auth_kerb/metadata.xml b/www-apache/mod_auth_kerb/metadata.xml
new file mode 100644
index 000000000000..b60e59808279
--- /dev/null
+++ b/www-apache/mod_auth_kerb/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>maintainer-needed@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">modauthkerb</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/www-apache/mod_auth_kerb/mod_auth_kerb-5.3.ebuild b/www-apache/mod_auth_kerb/mod_auth_kerb-5.3.ebuild
new file mode 100644
index 000000000000..69affa67701b
--- /dev/null
+++ b/www-apache/mod_auth_kerb/mod_auth_kerb-5.3.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit apache-module
+
+DESCRIPTION="An Apache authentication module using Kerberos"
+HOMEPAGE="http://modauthkerb.sourceforge.net/"
+SRC_URI="mirror://sourceforge/modauthkerb/${P}.tar.gz"
+
+LICENSE="BSD openafs-krb5-a HPND"
+SLOT="0"
+KEYWORDS="~amd64 x86"
+IUSE=""
+
+DEPEND="virtual/krb5"
+RDEPEND="${DEPEND}"
+
+APACHE2_MOD_CONF="11_${PN}"
+APACHE2_MOD_DEFINE="AUTH_KERB"
+
+DOCFILES="INSTALL README"
+
+need_apache2_2
+
+src_compile() {
+ CFLAGS="" APXS="${APXS}" econf --with-krb5=/usr --without-krb4 || die "econf failed"
+ emake || die "emake failed"
+}
diff --git a/www-apache/mod_auth_kerb/mod_auth_kerb-5.4-r2.ebuild b/www-apache/mod_auth_kerb/mod_auth_kerb-5.4-r2.ebuild
new file mode 100644
index 000000000000..7b3fdf4690ab
--- /dev/null
+++ b/www-apache/mod_auth_kerb/mod_auth_kerb-5.4-r2.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit apache-module eutils systemd
+
+DESCRIPTION="An Apache authentication module using Kerberos"
+HOMEPAGE="http://modauthkerb.sourceforge.net/"
+SRC_URI="mirror://sourceforge/modauthkerb/${P}.tar.gz"
+
+LICENSE="BSD openafs-krb5-a HPND"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="virtual/krb5"
+RDEPEND="${DEPEND}"
+
+APACHE2_MOD_CONF="11_${PN}"
+APACHE2_MOD_DEFINE="AUTH_KERB"
+
+DOCFILES="INSTALL README"
+
+need_apache2
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-rcopshack.patch
+ epatch "${FILESDIR}"/${P}-fixes.patch
+ epatch "${FILESDIR}"/${P}-s4u2proxy-r3.patch
+ epatch "${FILESDIR}"/${P}-httpd24.patch
+ epatch "${FILESDIR}"/${P}-delegation.patch
+ epatch "${FILESDIR}"/${P}-cachedir.patch
+ epatch "${FILESDIR}"/${P}-longuser.patch
+ epatch "${FILESDIR}"/${P}-handle-continue.patch
+}
+
+src_configure() {
+ CFLAGS="" APXS="${APXS}" econf --with-krb5=/usr --without-krb4
+}
+
+src_compile() {
+ emake
+}
+
+src_install() {
+ apache-module_src_install
+ systemd_dotmpfilesd "${FILESDIR}/${PN}.conf"
+}
diff --git a/www-apache/mod_auth_mysql/Manifest b/www-apache/mod_auth_mysql/Manifest
new file mode 100644
index 000000000000..279999df809e
--- /dev/null
+++ b/www-apache/mod_auth_mysql/Manifest
@@ -0,0 +1 @@
+DIST mod_auth_mysql-3.0.0.tar.gz 19257 SHA256 56da2e386583548f2fd9976101633f028d5d4649b46f428ff1d0dd1639efbad4 SHA512 99e71b0df27966b1540be325c2e124e3f09e40b39afbc6757b539309358b9a52dbeae21f16429348db014f136a19b06859e82af7c5bb5130c6cb923138b79fc9 WHIRLPOOL 60538b9fa9d1e6baea874ad5b1fac0ec12e39dd11e465e197275177b6ea01c974baa1ba8d2ede688cf57ee155e80dfd909292b08b9751b372df1616818eabe89
diff --git a/www-apache/mod_auth_mysql/files/12_mod_auth_mysql.conf b/www-apache/mod_auth_mysql/files/12_mod_auth_mysql.conf
new file mode 100644
index 000000000000..f33ced4bdda0
--- /dev/null
+++ b/www-apache/mod_auth_mysql/files/12_mod_auth_mysql.conf
@@ -0,0 +1,132 @@
+<IfDefine AUTH_MYSQL>
+LoadModule mysql_auth_module modules/mod_auth_mysql.so
+
+# mod_auth_mysql can be used to limit access to documents by checking
+# data in a MySQL database.
+
+# This will enable user-based MySQL authentication of everything
+# within /home/httpd. You'll need to do the following as the MySQL
+# root user beforehand:
+#
+# CREATE DATABASE auth;
+# USE auth;
+# CREATE TABLE users (
+# user_name CHAR(30) NOT NULL,
+# user_passwd CHAR(20) NOT NULL,
+# PRIMARY KEY (user_name)
+# );
+# GRANT SELECT
+# ON auth.users
+# TO authuser@localhost
+# IDENTIFIED BY 'PaSsW0Rd';
+#
+# INSERT INTO users VALUES ('testuser', ENCRYPT('testpass'));
+#
+#<Directory /home/httpd>
+# # If you want tot make mod_auth_mysql work with apache-2.2, please uncomment
+# # the following line:
+# #AuthBasicAuthoritative Off
+# AuthName "MySQL authenticated zone"
+# AuthType Basic
+#
+# AuthMySQLUser authuser
+# AuthMySQLPassword PaSsW0Rd
+# AuthMySQLDB auth
+# AuthMySQLUserTable users
+# AuthMySQLNameField user_name
+# AuthMySQLPasswordField user_passwd
+#
+# require valid-user
+#</Directory>
+
+# This will enable group-based MySQL authentication of everything
+# within /home/httpd. You'll need to do the following as the MySQL
+# root user beforehand:
+#
+# CREATE DATABASE auth;
+# USE auth;
+# CREATE TABLE users (
+# user_name CHAR(30) NOT NULL,
+# user_passwd CHAR(20) NOT NULL,
+# user_group CHAR(20) NOT NULL,
+# PRIMARY KEY (user_name)
+# );
+# GRANT SELECT
+# ON auth.users
+# TO authuser@localhost
+# IDENTIFIED BY 'PaSsW0Rd';
+#
+# INSERT INTO users VALUES ('testuser', ENCRYPT('testpass'), 'user');
+# INSERT INTO users VALUES ('testadmin', ENCRYPT('testpass'), 'admin');
+#
+#<Directory /home/httpd>
+# # If you want tot make mod_auth_mysql work with apache-2.2, please uncomment
+# # the following line:
+# #AuthBasicAuthoritative Off
+# AuthName "MySQL group authenticated zone"
+# AuthType Basic
+#
+# AuthMySQLUser authuser
+# AuthMySQLPassword PaSsW0Rd
+# AuthMySQLDB auth
+# AuthMySQLUserTable users
+# AuthMySQLNameField user_name
+# AuthMySQLPasswordField user_passwd
+# AuthMySQLGroupField user_group
+#
+# require group admin
+#</Directory>
+
+# Like the above this enables group-based MySQL authentication of
+# everything within /home/httpd, but this configuration allows users to
+# belong to more than one group. You'll need to do the following as
+# the MySQL root user beforehand:
+#
+# CREATE DATABASE auth;
+# USE auth;
+# CREATE TABLE users (
+# user_name CHAR(30) NOT NULL,
+# user_passwd CHAR(20) NOT NULL,
+# PRIMARY KEY (user_name)
+# );
+# CREATE TABLE groups (
+# user_name CHAR(30) NOT NULL,
+# user_group CHAR(20) NOT NULL,
+# PRIMARY KEY (user_name, user_group)
+# );
+# GRANT SELECT
+# ON auth.users
+# TO authuser@localhost
+# IDENTIFIED BY 'PaSsW0Rd';
+# GRANT SELECT
+# ON auth.groups
+# TO authuser@localhost
+# IDENTIFIED BY 'PaSsW0Rd';
+#
+# INSERT INTO users VALUES ('testuser', ENCRYPT('testpass'));
+# INSERT INTO groups VALUES ('testuser', 'user');
+# INSERT INTO users VALUES ('testadmin', ENCRYPT('testpass'));
+# INSERT INTO groups VALUES ('testadmin', 'admin');
+# INSERT INTO groups VALUES ('testadmin', 'user');
+#
+#<Directory /home/httpd>
+# # If you want tot make mod_auth_mysql work with apache-2.2, please uncomment
+# # the following line:
+# #AuthBasicAuthoritative Off
+# AuthName "MySQL group authenticated zone"
+# AuthType Basic
+#
+# AuthMySQLUser authuser
+# AuthMySQLPassword PaSsW0Rd
+# AuthMySQLDB auth
+# AuthMySQLUserTable users
+# AuthMySQLNameField user_name
+# AuthMySQLPasswordField user_passwd
+# AuthMySQLGroupTable groups
+# AuthMySQLGroupField user_group
+#
+# require group user
+#</Directory>
+</IfDefine>
+
+# vim: ts=4 filetype=apache
diff --git a/www-apache/mod_auth_mysql/files/mod_auth_mysql-3.0.0-apache-2.2.patch b/www-apache/mod_auth_mysql/files/mod_auth_mysql-3.0.0-apache-2.2.patch
new file mode 100644
index 000000000000..30881f878d23
--- /dev/null
+++ b/www-apache/mod_auth_mysql/files/mod_auth_mysql-3.0.0-apache-2.2.patch
@@ -0,0 +1,131 @@
+Index: mod_auth_mysql-3.0.0/mod_auth_mysql.c
+===================================================================
+--- mod_auth_mysql-3.0.0.orig/mod_auth_mysql.c
++++ mod_auth_mysql-3.0.0/mod_auth_mysql.c
+@@ -206,7 +206,7 @@
+ #define SNPRINTF apr_snprintf
+ #define PSTRDUP apr_pstrdup
+ #define PSTRNDUP apr_pstrndup
+- #define STRCAT ap_pstrcat
++ #define STRCAT apr_pstrcat
+ #define POOL apr_pool_t
+ #include "http_request.h" /* for ap_hook_(check_user_id | auth_checker)*/
+ #include "ap_compat.h"
+@@ -237,7 +237,7 @@
+ #define SNPRINTF ap_snprintf
+ #define PSTRDUP ap_pstrdup
+ #define PSTRNDUP ap_pstrndup
+- #define STRCAT ap_pstrcat
++ #define STRCAT apr_pstrcat
+ #define POOL pool
+ #include <stdlib.h>
+ #include "ap_sha1.h"
+@@ -589,87 +589,87 @@ static void * create_mysql_auth_dir_conf
+ static
+ command_rec mysql_auth_cmds[] = {
+ AP_INIT_TAKE1("AuthMySQLHost", ap_set_string_slot,
+- (void *) APR_XtOffsetOf(mysql_auth_config_rec, mysqlhost),
++ (void *) APR_OFFSETOF(mysql_auth_config_rec, mysqlhost),
+ OR_AUTHCFG, "mysql server host name"),
+
+ AP_INIT_TAKE1("AuthMySQLPort", ap_set_int_slot,
+- (void *) APR_XtOffsetOf(mysql_auth_config_rec, mysqlport),
++ (void *) APR_OFFSETOF(mysql_auth_config_rec, mysqlport),
+ OR_AUTHCFG, "mysql server port number"),
+
+ AP_INIT_TAKE1("AuthMySQLSocket", ap_set_string_slot,
+- (void *) APR_XtOffsetOf(mysql_auth_config_rec, mysqlsocket),
++ (void *) APR_OFFSETOF(mysql_auth_config_rec, mysqlsocket),
+ OR_AUTHCFG, "mysql server socket path"),
+
+ AP_INIT_TAKE1("AuthMySQLUser", ap_set_string_slot,
+- (void *) APR_XtOffsetOf(mysql_auth_config_rec, mysqluser),
++ (void *) APR_OFFSETOF(mysql_auth_config_rec, mysqluser),
+ OR_AUTHCFG, "mysql server user name"),
+
+ AP_INIT_TAKE1("AuthMySQLPassword", ap_set_string_slot,
+- (void *) APR_XtOffsetOf(mysql_auth_config_rec, mysqlpasswd),
++ (void *) APR_OFFSETOF(mysql_auth_config_rec, mysqlpasswd),
+ OR_AUTHCFG, "mysql server user password"),
+
+ AP_INIT_TAKE1("AuthMySQLDB", ap_set_string_slot,
+- (void *) APR_XtOffsetOf(mysql_auth_config_rec, mysqlDB),
++ (void *) APR_OFFSETOF(mysql_auth_config_rec, mysqlDB),
+ OR_AUTHCFG, "mysql database name"),
+
+ AP_INIT_TAKE1("AuthMySQLUserTable", ap_set_string_slot,
+- (void *) APR_XtOffsetOf(mysql_auth_config_rec, mysqlpwtable),
++ (void *) APR_OFFSETOF(mysql_auth_config_rec, mysqlpwtable),
+ OR_AUTHCFG, "mysql user table name"),
+
+ AP_INIT_TAKE1("AuthMySQLGroupTable", ap_set_string_slot,
+- (void *) APR_XtOffsetOf(mysql_auth_config_rec, mysqlgrptable),
++ (void *) APR_OFFSETOF(mysql_auth_config_rec, mysqlgrptable),
+ OR_AUTHCFG, "mysql group table name"),
+
+ AP_INIT_TAKE1("AuthMySQLNameField", ap_set_string_slot,
+- (void *) APR_XtOffsetOf(mysql_auth_config_rec, mysqlNameField),
++ (void *) APR_OFFSETOF(mysql_auth_config_rec, mysqlNameField),
+ OR_AUTHCFG, "mysql User ID field name within User table"),
+
+ AP_INIT_TAKE1("AuthMySQLGroupField", ap_set_string_slot,
+- (void *) APR_XtOffsetOf(mysql_auth_config_rec, mysqlGroupField),
++ (void *) APR_OFFSETOF(mysql_auth_config_rec, mysqlGroupField),
+ OR_AUTHCFG, "mysql Group field name within table"),
+
+ AP_INIT_TAKE1("AuthMySQLGroupUserNameField", ap_set_string_slot,
+- (void *) APR_XtOffsetOf(mysql_auth_config_rec, mysqlGroupUserNameField),
++ (void *) APR_OFFSETOF(mysql_auth_config_rec, mysqlGroupUserNameField),
+ OR_AUTHCFG, "mysql User ID field name within Group table"),
+
+ AP_INIT_TAKE1("AuthMySQLPasswordField", ap_set_string_slot,
+- (void *) APR_XtOffsetOf(mysql_auth_config_rec, mysqlPasswordField),
++ (void *) APR_OFFSETOF(mysql_auth_config_rec, mysqlPasswordField),
+ OR_AUTHCFG, "mysql Password field name within table"),
+
+ AP_INIT_TAKE1("AuthMySQLPwEncryption", ap_set_string_slot,
+- (void *) APR_XtOffsetOf(mysql_auth_config_rec, mysqlEncryptionField),
++ (void *) APR_OFFSETOF(mysql_auth_config_rec, mysqlEncryptionField),
+ OR_AUTHCFG, "mysql password encryption method"),
+
+ AP_INIT_TAKE1("AuthMySQLSaltField", ap_set_string_slot,
+- (void*) APR_XtOffsetOf(mysql_auth_config_rec, mysqlSaltField),
++ (void*) APR_OFFSETOF(mysql_auth_config_rec, mysqlSaltField),
+ OR_AUTHCFG, "mysql salfe field name within table"),
+
+ /* AP_INIT_FLAG("AuthMySQLKeepAlive", ap_set_flag_slot,
+- (void *) APR_XtOffsetOf(mysql_auth_config_rec, mysqlKeepAlive),
++ (void *) APR_OFFSETOF(mysql_auth_config_rec, mysqlKeepAlive),
+ OR_AUTHCFG, "mysql connection kept open across requests if On"),
+ */
+ AP_INIT_FLAG("AuthMySQLAuthoritative", ap_set_flag_slot,
+- (void *) APR_XtOffsetOf(mysql_auth_config_rec, mysqlAuthoritative),
++ (void *) APR_OFFSETOF(mysql_auth_config_rec, mysqlAuthoritative),
+ OR_AUTHCFG, "mysql lookup is authoritative if On"),
+
+ AP_INIT_FLAG("AuthMySQLNoPasswd", ap_set_flag_slot,
+- (void *) APR_XtOffsetOf(mysql_auth_config_rec, mysqlNoPasswd),
++ (void *) APR_OFFSETOF(mysql_auth_config_rec, mysqlNoPasswd),
+ OR_AUTHCFG, "If On, only check if user exists; ignore password"),
+
+ AP_INIT_FLAG("AuthMySQLEnable", ap_set_flag_slot,
+- (void *) APR_XtOffsetOf(mysql_auth_config_rec, mysqlEnable),
++ (void *) APR_OFFSETOF(mysql_auth_config_rec, mysqlEnable),
+ OR_AUTHCFG, "enable mysql authorization"),
+
+ AP_INIT_TAKE1("AuthMySQLUserCondition", ap_set_string_slot,
+- (void *) APR_XtOffsetOf(mysql_auth_config_rec, mysqlUserCondition),
++ (void *) APR_OFFSETOF(mysql_auth_config_rec, mysqlUserCondition),
+ OR_AUTHCFG, "condition to add to user where-clause"),
+
+ AP_INIT_TAKE1("AuthMySQLGroupCondition", ap_set_string_slot,
+- (void *) APR_XtOffsetOf(mysql_auth_config_rec, mysqlGroupCondition),
++ (void *) APR_OFFSETOF(mysql_auth_config_rec, mysqlGroupCondition),
+ OR_AUTHCFG, "condition to add to group where-clause"),
+
+ AP_INIT_TAKE1("AuthMySQLCharacterSet", ap_set_string_slot,
+- (void *) APR_XtOffsetOf(mysql_auth_config_rec, mysqlCharacterSet),
++ (void *) APR_OFFSETOF(mysql_auth_config_rec, mysqlCharacterSet),
+ OR_AUTHCFG, "mysql character set to be used"),
+
+ { NULL }
diff --git a/www-apache/mod_auth_mysql/files/mod_auth_mysql-3.0.0-htpasswd2-auth-style.patch b/www-apache/mod_auth_mysql/files/mod_auth_mysql-3.0.0-htpasswd2-auth-style.patch
new file mode 100644
index 000000000000..e7f6eb31ef3f
--- /dev/null
+++ b/www-apache/mod_auth_mysql/files/mod_auth_mysql-3.0.0-htpasswd2-auth-style.patch
@@ -0,0 +1,35 @@
+Index: mod_auth_mysql-3.0.0/mod_auth_mysql.c
+===================================================================
+--- mod_auth_mysql-3.0.0.orig/mod_auth_mysql.c
++++ mod_auth_mysql-3.0.0/mod_auth_mysql.c
+@@ -288,6 +288,7 @@ static short pw_crypted(POOL * pool, con
+ static short pw_aes(POOL * pool, const char * real_pw, const char * sent_pw, const char * salt);
+ #endif
+ static short pw_sha1(POOL * pool, const char * real_pw, const char * sent_pw, const char * salt);
++static short pw_apr(POOL * pool, const char * real_pw, const char * sent_pw, const char * salt);
+ static short pw_plain(POOL * pool, const char * real_pw, const char * sent_pw, const char * salt);
+
+ static char * format_remote_host(request_rec * r, char ** parm);
+@@ -318,7 +319,8 @@ static encryption encryptions[] = {{"cry
+ #if _AES
+ {"aes", SALT_REQUIRED, pw_aes},
+ #endif
+- {"sha1", NO_SALT, pw_sha1}};
++ {"sha1", NO_SALT, pw_sha1},
++ {"apr", NO_SALT, pw_apr}};
+ typedef struct { /* User formatting patterns */
+ char pattern; /* Pattern to match */
+ char * (*func)(request_rec * r, char ** parm);
+@@ -856,6 +858,12 @@ static short pw_sha1(POOL * pool, const
+ return strcasecmp(bin2hex(pool, scrambled_sent_pw, enc_len), real_pw) == 0;
+ }
+
++/* checks passwords from htpasswd */
++static short pw_apr(POOL * pool, const char * real_pw, const char * sent_pw, const char * salt) {
++ /* apr_password_validate will do the job */
++ return apr_password_validate(sent_pw, real_pw) == APR_SUCCESS;
++}
++
+ /* checks plain text passwords */
+ static short pw_plain(POOL * pool, const char * real_pw, const char * sent_pw, const char * salt) {
+ return strcmp(real_pw, sent_pw) == 0;
diff --git a/www-apache/mod_auth_mysql/metadata.xml b/www-apache/mod_auth_mysql/metadata.xml
new file mode 100644
index 000000000000..eb0a45566bdb
--- /dev/null
+++ b/www-apache/mod_auth_mysql/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>mysql</herd>
+ <upstream>
+ <remote-id type="sourceforge">modauthmysql</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/www-apache/mod_auth_mysql/mod_auth_mysql-3.0.0-r3.ebuild b/www-apache/mod_auth_mysql/mod_auth_mysql-3.0.0-r3.ebuild
new file mode 100644
index 000000000000..f6772bc9fc68
--- /dev/null
+++ b/www-apache/mod_auth_mysql/mod_auth_mysql-3.0.0-r3.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+
+inherit apache-module eutils multilib
+
+DESCRIPTION="Basic authentication for Apache using a MySQL database"
+HOMEPAGE="http://modauthmysql.sourceforge.net/"
+SRC_URI="mirror://sourceforge/modauthmysql/${P}.tar.gz"
+
+LICENSE="Apache-1.1"
+KEYWORDS="amd64 x86"
+SLOT="0"
+IUSE=""
+
+DEPEND="virtual/mysql
+ sys-libs/zlib"
+RDEPEND="${DEPEND}
+ !www-apache/mod-auth-mysql"
+
+APXS2_ARGS="-c -I/usr/include/mysql -L/usr/$(get_libdir)/mysql -Wl,-R/usr/$(get_libdir)/mysql -lmysqlclient_r -lm -lz ${PN}.c"
+APACHE2_MOD_CONF="12_${PN}"
+APACHE2_MOD_DEFINE="AUTH_MYSQL"
+
+DOCFILES="README CONFIGURE"
+
+need_apache2_2
+
+src_prepare() {
+ epatch "${FILESDIR}/${P}-apache-2.2.patch"
+ epatch "${FILESDIR}/${P}-htpasswd2-auth-style.patch"
+}
diff --git a/www-apache/mod_auth_nufw/Manifest b/www-apache/mod_auth_nufw/Manifest
new file mode 100644
index 000000000000..d02f97dd16ec
--- /dev/null
+++ b/www-apache/mod_auth_nufw/Manifest
@@ -0,0 +1 @@
+DIST mod_auth_nufw-2.2.2.tar.bz2 35865 SHA256 10a779a7cd6eb1ad6f40ec385e2f58e65f280a6c91916c5616ec3fbac8ab9d13
diff --git a/www-apache/mod_auth_nufw/files/50_mod_auth_nufw.conf b/www-apache/mod_auth_nufw/files/50_mod_auth_nufw.conf
new file mode 100644
index 000000000000..6897d3b6b5ac
--- /dev/null
+++ b/www-apache/mod_auth_nufw/files/50_mod_auth_nufw.conf
@@ -0,0 +1,5 @@
+<IfDefine AUTH_NUFW>
+LoadModule mod_auth_nufw modules/mod_auth_nufw.so
+</IfDefine>
+
+# vim: ts=4 filetype=apache
diff --git a/www-apache/mod_auth_nufw/metadata.xml b/www-apache/mod_auth_nufw/metadata.xml
new file mode 100644
index 000000000000..fb401b58e576
--- /dev/null
+++ b/www-apache/mod_auth_nufw/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>maintainer-needed@gentoo.org</email>
+ </maintainer>
+ <longdescription>A NuFW authentication module for apache</longdescription>
+</pkgmetadata>
diff --git a/www-apache/mod_auth_nufw/mod_auth_nufw-2.2.2.ebuild b/www-apache/mod_auth_nufw/mod_auth_nufw-2.2.2.ebuild
new file mode 100644
index 000000000000..fb244268225d
--- /dev/null
+++ b/www-apache/mod_auth_nufw/mod_auth_nufw-2.2.2.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+
+inherit autotools confutils apache-module
+
+DESCRIPTION="A NuFW authentication module for Apache"
+HOMEPAGE="http://software.inl.fr/trac/wiki/EdenWall/mod_auth_nufw"
+SRC_URI="http://software.inl.fr/releases/${PN}/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="+mysql postgres"
+
+DEPEND="mysql? ( virtual/mysql )
+ postgres? ( dev-db/postgresql[server] )"
+RDEPEND="${DEPEND}"
+
+APACHE2_MOD_FILE="mod_auth_nufw.so"
+APACHE2_MOD_CONF="50_${PN}"
+APACHE2_MOD_DEFINE="AUTH_NUFW"
+
+DOCFILES="doc/mod_auth_nufw.html"
+
+need_apache2_2
+
+pkg_setup() {
+ confutils_require_one mysql postgres
+}
+
+src_prepare() {
+ eautoreconf
+}
+
+src_configure() {
+ CPPFLAGS="-I$(/usr/bin/apr-1-config --includedir) ${CPPFLAGS}" \
+ econf \
+ --with-apache22 \
+ $(use_with mysql) \
+ || die "econf failed"
+}
+
+src_compile() {
+ emake || die "emake failed"
+}
diff --git a/www-apache/mod_auth_openid/Manifest b/www-apache/mod_auth_openid/Manifest
new file mode 100644
index 000000000000..010709f8fd8a
--- /dev/null
+++ b/www-apache/mod_auth_openid/Manifest
@@ -0,0 +1 @@
+DIST mod_auth_openid-0.8.tar.gz 355531 SHA256 86812c9659e2b36b3d2cac98cdcb97d743d08ca76120159f20cc77800947445a SHA512 3994585fa26c42fde8ab76992c62c8a486316bd418bc2eac65e1390bbcd87e3b96fc1b58cb3645e749cb0cfc74811bb5035bc014f0b95bf6f037ec9f5c0ac7e2 WHIRLPOOL 3963b743735b0557503b186d8d0b1d2d35e6b6554bb155a1e595d512e93a84ea28123b1fa3ef2d493f4e8bddbe9fd141f68fdc72d31200fed5d601dd7ba20eb0
diff --git a/www-apache/mod_auth_openid/files/10_mod_auth_openid.conf b/www-apache/mod_auth_openid/files/10_mod_auth_openid.conf
new file mode 100644
index 000000000000..2364dc36b3e9
--- /dev/null
+++ b/www-apache/mod_auth_openid/files/10_mod_auth_openid.conf
@@ -0,0 +1,5 @@
+<IfDefine AUTH_OPENID>
+LoadModule authopenid_module modules/mod_auth_openid.so
+</IfDefine>
+
+# vim: ts=4 filetype=apache
diff --git a/www-apache/mod_auth_openid/metadata.xml b/www-apache/mod_auth_openid/metadata.xml
new file mode 100644
index 000000000000..42650fd9cd16
--- /dev/null
+++ b/www-apache/mod_auth_openid/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>maintainer-needed@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">bmuller/mod_auth_openid</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/www-apache/mod_auth_openid/mod_auth_openid-0.8.ebuild b/www-apache/mod_auth_openid/mod_auth_openid-0.8.ebuild
new file mode 100644
index 000000000000..8caec457bcde
--- /dev/null
+++ b/www-apache/mod_auth_openid/mod_auth_openid-0.8.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit apache-module
+
+DESCRIPTION="An OpenID authentication module for the apache webserver"
+HOMEPAGE="http://findingscience.com/mod_auth_openid/"
+SRC_URI="https://github.com/bmuller/mod_auth_openid/releases/download/v${PV}/${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND=">=dev-db/sqlite-3
+ dev-libs/libpcre
+ >=net-libs/libopkele-2.0
+ net-misc/curl"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+APACHE2_MOD_CONF="10_${PN}"
+APACHE2_MOD_DEFINE="AUTH_OPENID"
+
+need_apache2
+
+src_configure() {
+ econf --with-apxs="${APXS}" \
+ --with-sqlite3=/usr \
+ --with-apr-config=/usr/bin/apr-1-config
+}
+
+src_compile() {
+ # default src_compile fails
+ emake
+}
diff --git a/www-apache/mod_auth_pgsql/Manifest b/www-apache/mod_auth_pgsql/Manifest
new file mode 100644
index 000000000000..55f24a8acb8a
--- /dev/null
+++ b/www-apache/mod_auth_pgsql/Manifest
@@ -0,0 +1 @@
+DIST mod_auth_pgsql-2.0.3.tar.gz 15474 SHA256 51651609d742e21bbc587fd4951b41a39deda53262cbf931b9b40bdda3b5cb92 SHA512 9ec9d9c1075d37e62e98f0f5519147d9fb2042ef7e149ff50461f3966d548afceefc330f4a1c3bd8fc64b5e93ed3e85508571a5b1b9832974c84267737e89cb0 WHIRLPOOL dea354fb9b3a06f668b8b039339b5972e295abd7357d6c5a61f6192a5c3bbcad1227f86a3d9b552e4b564476b8da9ded5f7b175d77f4cba0c3e360567aef13b2
diff --git a/www-apache/mod_auth_pgsql/files/80_mod_auth_pgsql.conf b/www-apache/mod_auth_pgsql/files/80_mod_auth_pgsql.conf
new file mode 100644
index 000000000000..96ea129e9f6e
--- /dev/null
+++ b/www-apache/mod_auth_pgsql/files/80_mod_auth_pgsql.conf
@@ -0,0 +1,9 @@
+# To make this module work with apache 2.2 you have to specify
+# `AuthBasicAuthoritative Off' in your authentication section. See
+# http://httpd.apache.org/docs/2.2/mod/mod_auth_basic.html#authbasicauthoritative
+
+<IfDefine AUTH_PGSQL>
+LoadModule auth_pgsql_module modules/mod_auth_pgsql.so
+</IfDefine>
+
+# vim: ts=4 filetype=apache
diff --git a/www-apache/mod_auth_pgsql/files/mod_auth_pgsql-2.0.3-apache-2.4.patch b/www-apache/mod_auth_pgsql/files/mod_auth_pgsql-2.0.3-apache-2.4.patch
new file mode 100644
index 000000000000..d9818eb7a136
--- /dev/null
+++ b/www-apache/mod_auth_pgsql/files/mod_auth_pgsql-2.0.3-apache-2.4.patch
@@ -0,0 +1,341 @@
+From: Marco Nenciarini <mnencia@debian.org>
+Date: Sat, 20 Jul 2013 18:47:04 +0200
+Subject: apache 2.4
+
+---
+ mod_auth_pgsql.c | 196 ++++++++++++-------------------------------------------
+ 1 file changed, 41 insertions(+), 155 deletions(-)
+
+diff --git a/mod_auth_pgsql.c b/mod_auth_pgsql.c
+index 639537d..26d7f90 100644
+--- a/mod_auth_pgsql.c
++++ b/mod_auth_pgsql.c
+@@ -109,6 +109,8 @@
+ #include "http_request.h"
+ #include "util_script.h"
+
++#include "mod_auth.h"
++
+ #ifdef WIN32
+ #define crypt apr_password_validate
+ #else
+@@ -191,7 +193,7 @@ module AP_MODULE_DECLARE_DATA auth_pgsql_module;
+
+
+ static int pg_log_auth_user(request_rec * r, pg_auth_config_rec * sec,
+- char *user, char *sent_pw);
++ const char *user, const char *sent_pw);
+ static char *do_pg_query(request_rec * r, char *query,
+ pg_auth_config_rec * sec);
+
+@@ -442,9 +444,8 @@ static char pg_errstr[MAX_STRING_LEN];
+ * failures separately
+ */
+
+-static char *auth_pg_md5(char *pw)
++static char *auth_pg_md5(const char *pw)
+ {
+- apr_md5_ctx_t ctx;
+ unsigned char digest[APR_MD5_DIGESTSIZE];
+ static unsigned char md5hash[APR_MD5_DIGESTSIZE * 2 + 1];
+ int i;
+@@ -459,14 +460,15 @@ static char *auth_pg_md5(char *pw)
+ }
+
+
+-static char *auth_pg_base64(char *pw)
++static char *auth_pg_base64(const char *pw)
+ {
+ if (auth_pgsql_pool_base64 == NULL)
+ apr_pool_create_ex(&auth_pgsql_pool_base64, NULL, NULL, NULL);
+ if (auth_pgsql_pool == NULL)
+ return NULL;
+
+- return ap_pbase64encode(auth_pgsql_pool, pw);
++ /* NOTE: ap_pbase64encode is no change arg2. so removable const. */
++ return ap_pbase64encode(auth_pgsql_pool, (char *)pw);
+ }
+
+
+@@ -557,7 +559,8 @@ char *do_pg_query(request_rec * r, char *query, pg_auth_config_rec * sec)
+
+ if (!check || strcmp(sec->auth_pg_charset, check)) {
+ apr_snprintf(pg_errstr, MAX_STRING_LEN,
+- "mod_auth_pgsql database character set encoding %s");
++ "mod_auth_pgsql database character set encoding %s",
++ check);
+ PQfinish(pg_conn);
+ return NULL;
+ }
+@@ -614,7 +617,7 @@ char *do_pg_query(request_rec * r, char *query, pg_auth_config_rec * sec)
+ return result;
+ }
+
+-char *get_pg_pw(request_rec * r, char *user, pg_auth_config_rec * sec)
++char *get_pg_pw(request_rec * r, const char *user, pg_auth_config_rec * sec)
+ {
+ char query[MAX_STRING_LEN];
+ char *safe_user;
+@@ -755,19 +758,20 @@ static char *get_pg_grp(request_rec * r, char *group, char *user,
+ }
+
+ /* Process authentication request from Apache*/
+-static int pg_authenticate_basic_user(request_rec * r)
++static authn_status check_password(request_rec *r, const char *user,
++ const char *password)
+ {
++
+ pg_auth_config_rec *sec =
+ (pg_auth_config_rec *) ap_get_module_config(r->per_dir_config,
+ &auth_pgsql_module);
+- char *val = NULL;
+- char *sent_pw, *real_pw;
+- int res;
+- char *user;
++ const char *val = NULL;
++ const char *sent_pw;
++ const char *real_pw;
++ authn_status auth_res;
++
++ sent_pw = password;
+
+- if ((res = ap_get_basic_auth_pw(r, (const char **) &sent_pw)))
+- return res;
+- user = r->user;
+
+ #ifdef DEBUG_AUTH_PGSQL
+ ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r,
+@@ -784,7 +788,7 @@ static int pg_authenticate_basic_user(request_rec * r)
+ if ((!sec->auth_pg_pwd_table) && (!sec->auth_pg_pwd_field)) {
+ ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r,
+ "[mod_auth_pgsql.c] - missing configuration parameters");
+- return DECLINED;
++ return AUTH_GENERAL_ERROR;
+ }
+ pg_errstr[0] = '\0';
+
+@@ -809,22 +813,16 @@ static int pg_authenticate_basic_user(request_rec * r)
+
+ if (!real_pw) {
+ if (pg_errstr[0]) {
+- res = HTTP_INTERNAL_SERVER_ERROR;
++ auth_res = AUTH_GENERAL_ERROR;
+ } else {
+- if (sec->auth_pg_authoritative) {
+ /* force error and access denied */
+ apr_snprintf(pg_errstr, MAX_STRING_LEN,
+ "mod_auth_pgsql: Password for user %s not found (PG-Authoritative)",
+ user);
+- ap_note_basic_auth_failure(r);
+- res = HTTP_UNAUTHORIZED;
+- } else {
+- /* allow fall through to another module */
+- return DECLINED;
+- }
++ auth_res = AUTH_USER_NOT_FOUND;
+ }
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, "[mod_auth_pgsql.c] - ERROR - %s", pg_errstr);
+- return res;
++ return auth_res;
+ }
+
+ /* allow no password, if the flag is set and the password
+@@ -836,7 +834,7 @@ static int pg_authenticate_basic_user(request_rec * r)
+ user);
+ ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r, "[mod_auth_pgsql.c] - ERROR - %s", pg_errstr);
+ pg_log_auth_user(r, sec, user, sent_pw);
+- return OK;
++ return AUTH_GRANTED;
+ };
+
+ /* if the flag is off however, keep that kind of stuff at
+@@ -847,8 +845,7 @@ static int pg_authenticate_basic_user(request_rec * r)
+ "[mod_auth_pgsql.c] - Empty password rejected for user \"%s\"",
+ user);
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, "[mod_auth_pgsql.c] - ERROR - %s", pg_errstr);
+- ap_note_basic_auth_failure(r);
+- return HTTP_UNAUTHORIZED;
++ return AUTH_DENIED;
+ };
+
+ if (sec->auth_pg_encrypted)
+@@ -877,8 +874,7 @@ static int pg_authenticate_basic_user(request_rec * r)
+ apr_snprintf(pg_errstr, MAX_STRING_LEN,
+ "PG user %s: password mismatch", user);
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, "[mod_auth_pgsql.c] - ERROR - %s", pg_errstr);
+- ap_note_basic_auth_failure(r);
+- return HTTP_UNAUTHORIZED;
++ return AUTH_DENIED;
+ }
+
+ /* store password in the cache */
+@@ -891,130 +887,13 @@ static int pg_authenticate_basic_user(request_rec * r)
+ }
+
+ pg_log_auth_user(r, sec, user, sent_pw);
+- return OK;
+-}
+-
+-/* Checking ID */
+-
+-static int pg_check_auth(request_rec * r)
+-{
+- pg_auth_config_rec *sec =
+- (pg_auth_config_rec *) ap_get_module_config(r->per_dir_config,
+- &auth_pgsql_module);
+- char *user = r->user;
+- int m = r->method_number;
+- int group_result = DECLINED;
+-
+-
+-
+- apr_array_header_t *reqs_arr = (apr_array_header_t *) ap_requires(r);
+- require_line *reqs = reqs_arr ? (require_line *) reqs_arr->elts : NULL;
+-
+- register int x, res;
+- const char *t;
+- char *w;
+-
+- pg_errstr[0] = '\0';
+-
+-#ifdef DEBUG_AUTH_PGSQL
+- ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r,
+- "[mod_auth_pgsql.c] - pg_check_auth - going to check auth for user \"%s\" ",
+- user);
+-#endif /* DEBUG_AUTH_PGSQL */
+-
+-
+- if (!pg_conn) {
+- if (!(pg_conn = pg_connect(sec))) {
+- ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, "[mod_auth_pgsql.c] - cannot connect to database");
+- ap_note_basic_auth_failure(r);
+- return HTTP_UNAUTHORIZED;
+- }
+- }
+-
+- /* if we cannot do it; leave it to some other guy
+- */
+- if ((!sec->auth_pg_grp_table) && (!sec->auth_pg_grp_group_field)
+- && (!sec->auth_pg_grp_user_field))
+- return DECLINED;
+-
+- if (!reqs_arr) {
+- if (sec->auth_pg_authoritative) {
+- /* force error and access denied */
+- apr_snprintf(pg_errstr, MAX_STRING_LEN,
+- "mod_auth_pgsql: user %s denied, no access rules specified (PG-Authoritative)",
+- user);
+- ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, "[mod_auth_pgsql.c] - ERROR - %s", pg_errstr);
+- ap_note_basic_auth_failure(r);
+- res = HTTP_UNAUTHORIZED;
+- } else {
+- return DECLINED;
+- }
+- }
+-
+- for (x = 0; x < reqs_arr->nelts; x++) {
+-
+- if (!(reqs[x].method_mask & (1 << m)))
+- continue;
+-
+- t = reqs[x].requirement;
+- w = ap_getword(r->pool, &t, ' ');
+-
+- if (!strcmp(w, "valid-user"))
+- return OK;
+-
+- if (!strcmp(w, "user")) {
+- while (t[0]) {
+- w = ap_getword_conf(r->pool, &t);
+- if (!strcmp(user, w))
+- return OK;
+- }
+- if (sec->auth_pg_authoritative) {
+- /* force error and access denied */
+- apr_snprintf(pg_errstr, MAX_STRING_LEN,
+- "mod_auth_pgsql: user %s denied, no access rules specified (PG-Authoritative)",
+- user);
+- ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, "[mod_auth_pgsql.c] - ERROR - %s", pg_errstr);
+- ap_note_basic_auth_failure(r);
+- return HTTP_UNAUTHORIZED;
+- }
+-
+- } else if (!strcmp(w, "group")) {
+- /* look up the membership for each of the groups in the table */
+- pg_errstr[0] = '\0';
+-
+- while (t[0]) {
+- if (get_pg_grp(r, ap_getword(r->pool, &t, ' '), user, sec)) {
+- group_result = OK;
+- };
+- };
+-
+- if (pg_errstr[0]) {
+- ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, "[mod_auth_pgsql.c] - ERROR - %s", pg_errstr);
+- return HTTP_INTERNAL_SERVER_ERROR;
+- }
+-
+- if (group_result == OK)
+- return OK;
+-
+- if (sec->auth_pg_authoritative) {
+- apr_snprintf(pg_errstr, MAX_STRING_LEN,
+- "[mod_auth_pgsql.c] - user %s not in right groups (PG-Authoritative)",
+- user);
+- ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, "[mod_auth_pgsql.c] - ERROR - %s", pg_errstr);
+- ap_note_basic_auth_failure(r);
+- return HTTP_UNAUTHORIZED;
+- };
+- }
+- }
+-
+- return DECLINED;
++ return AUTH_GRANTED;
+ }
+
+-
+ /* Send the authentication to the log table */
+ int
+-pg_log_auth_user(request_rec * r, pg_auth_config_rec * sec, char *user,
+- char *sent_pw)
++pg_log_auth_user(request_rec * r, pg_auth_config_rec * sec, const char *user,
++ const char *sent_pw)
+ {
+ char sql[MAX_STRING_LEN];
+ char *s;
+@@ -1087,7 +966,7 @@ pg_log_auth_user(request_rec * r, pg_auth_config_rec * sec, char *user,
+ sec->auth_pg_log_addrs_field);
+ strncat(fields, sql, MAX_STRING_LEN - strlen(fields) - 1);
+ apr_snprintf(sql, MAX_STRING_LEN, ", '%s'",
+- r->connection->remote_ip);
++ r->connection->client_ip);
+ strncat(values, sql, MAX_STRING_LEN - strlen(values) - 1);
+ }
+ if (sec->auth_pg_log_pwd_field) { /* Password field , clear WARNING */
+@@ -1140,15 +1019,22 @@ static void *pg_auth_server_config(apr_pool_t * p, server_rec * s)
+ }
+
+
++static const authn_provider authn_pgsql_provider =
++{
++ &check_password,
++ NULL,
++};
++
+ static void register_hooks(apr_pool_t * p)
+ {
+ ap_hook_post_config(pg_auth_init_handler, NULL, NULL, APR_HOOK_MIDDLE);
+- ap_hook_auth_checker(pg_check_auth, NULL, NULL, APR_HOOK_MIDDLE);
+- ap_hook_check_user_id(pg_authenticate_basic_user, NULL, NULL,
+- APR_HOOK_MIDDLE);
++
++ ap_register_auth_provider(p, AUTHN_PROVIDER_GROUP, "pgsql",
++ AUTHN_PROVIDER_VERSION,
++ &authn_pgsql_provider, AP_AUTH_INTERNAL_PER_CONF);
+ };
+
+-module AP_MODULE_DECLARE_DATA auth_pgsql_module = {
++AP_DECLARE_MODULE(auth_pgsql) = {
+ STANDARD20_MODULE_STUFF,
+ create_pg_auth_dir_config, /* dir config creater */
+ NULL, /* dir merger --- default is to override */
diff --git a/www-apache/mod_auth_pgsql/files/mod_auth_pgsql-2.0.3-documentation.patch b/www-apache/mod_auth_pgsql/files/mod_auth_pgsql-2.0.3-documentation.patch
new file mode 100644
index 000000000000..262d07dd59bf
--- /dev/null
+++ b/www-apache/mod_auth_pgsql/files/mod_auth_pgsql-2.0.3-documentation.patch
@@ -0,0 +1,124 @@
+From: Marco Nenciarini <mnencia@debian.org>
+Date: Sat, 10 Aug 2013 16:26:41 +0200
+Subject: documentation
+
+---
+ mod_auth_pgsql.html | 47 ++++++++++++++++++++++++++++-------------------
+ 1 file changed, 28 insertions(+), 19 deletions(-)
+
+diff --git a/mod_auth_pgsql.html b/mod_auth_pgsql.html
+index 3269fe0..d35768b 100644
+--- a/mod_auth_pgsql.html
++++ b/mod_auth_pgsql.html
+@@ -48,18 +48,19 @@ Notes</a> |<a href="#Changelog"> Changelog</a> </p>
+ <li><a href="#host">Auth_PG_host</a> </li>
+ <li><a href="#port">Auth_PG_port</a> </li>
+ <li><a href="#options">Auth_PG_options</a> </li>
+- <li><a href="#pwd_table">Auth_PG_database</a> </li>
+- <li><a href="#PGuser">Auth_PG_user</a> </li>
+- <li><a href="PGpwd">Auth_PG_pwd</a> </li>
+- <li><a href="#grp_table">Auth_PG_pwd_table</a> </li>
+- <li><a href="#uid_field">Auth_PG_grp_table</a> </li>
++ <li><a href="#database">Auth_PG_database</a> </li>
++ <li><a href="#user">Auth_PG_user</a> </li>
++ <li><a href="#pwd">Auth_PG_pwd</a> </li>
++ <li><a href="#pwd_table">Auth_PG_pwd_table</a> </li>
++ <li><a href="#grp_table">Auth_PG_grp_table</a> </li>
+ <li><a href="#uid_field">Auth_PG_uid_field</a> </li>
+ <li><a href="#pwd_field">Auth_PG_pwd_field</a> </li>
+- <li><a href="#gid_field">Auth_PG_gid_field</a> </li>
++ <li><a href="#grp_group_field">Auth_PG_grp_group_field</a> </li>
++ <li><a href="#grp_user_field">Auth_PG_grp_user_field</a> </li>
+ <li><a href="#nopasswd">Auth_PG_nopasswd</a> </li>
+ <li><a href="#authoritative">Auth_PG_authoritative</a> </li>
+- <li><a href="#lowercaseuid">Auth_PG_lowercase_uid</a> </li>
+- <li><a href="#uppercaseuid">Auth_PG_uppercase_uid</a></li>
++ <li><a href="#lowercase_uid">Auth_PG_lowercase_uid</a> </li>
++ <li><a href="#uppercase_uid">Auth_PG_uppercase_uid</a></li>
+ <li><a href="#pwd_ignore_case">Auth_PG_pwd_ignore_case</a><br>
+ </li>
+ <li><a href="#encrypted">Auth_PG_encrypted</a> </li>
+@@ -112,7 +113,7 @@ available options. </p>
+ information.<br>
+ <br>
+ </p>
+-<h2><a name="PGuser"></a> Auth_PG_user<br>
++<h2><a name="user"></a> Auth_PG_user<br>
+ </h2>
+ <b>Syntax:</b> Auth_PG_user <i>username</i><br>
+ <b>Context:</b> directory, .htaccess <br>
+@@ -125,7 +126,7 @@ access on all the log tables (if used).<br>
+ Needed if the user who make the quey is differrent from the
+ user runnig apache, or if the posmater is on a different server and you
+ must autheticate with password<br>
+-<h2><a name="PGpwd"></a> Auth_PG_pwd</h2>
++<h2><a name="pwd"></a> Auth_PG_pwd</h2>
+ <p><b>Syntax:</b> Auth_PG_pwd <i>password</i><br>
+ <b>Context:</b> directory, .htaccess <br>
+ <b>Override:</b> AuthConfig <br>
+@@ -169,17 +170,25 @@ in the Auth_PG_pwd_table relation. </p>
+ <b>Override:</b> AuthConfig <br>
+ <b>Status:</b> Extension
+ <p>Specifies the attribute name of the field containing the encrypted
+-(see Auth_PG_encrypted) password in the Auth_PGpwd_table relation.<br>
++(see Auth_PG_encrypted) password in the Auth_PG_pwd_table relation.<br>
+ Please remember to use field of type varchar, not char for the password.<br>
+ </p>
+-<h2><a name="gid_field"></a> Auth_PG_gid_field</h2>
+-<b>Syntax:</b> Auth_PG_gid_field <i>attribute name</i><br>
++<h2><a name="grp_group_field"></a> Auth_PG_grp_group_field</h2>
++<b>Syntax:</b> Auth_PG_grp_group_field <i>attribute name</i><br>
+ <b>Context:</b> directory, .htaccess <br>
+ <b>Override:</b> AuthConfig <br>
+ <b>Status:</b> Extension
+ <p>Specifies the attribute name of the field containing the group name
+ in the Auth_PG_grp_table relation. This directive is only necessary if
+ you want to authenticate by user groups. </p>
++<h2><a name="grp_user_field"></a> Auth_PG_grp_user_field</h2>
++<b>Syntax:</b> Auth_PG_grp_user_field <i>attribute name</i><br>
++<b>Context:</b> directory, .htaccess <br>
++<b>Override:</b> AuthConfig <br>
++<b>Status:</b> Extension
++<p>Specifies the attribute name of the field containing the user name
++in the Auth_PG_grp_table relation. This directive is only necessary if
++you want to authenticate by user groups. </p>
+ <h2><a name="nopasswd"></a> Auth_PG_nopasswd</h2>
+ <b>Syntax:</b> Auth_PG_nopasswd <i>on</i> or <i>off</i><br>
+ <b>Context:</b> directory, .htaccess <br>
+@@ -202,7 +211,7 @@ the PostgreSQL scheme, the parent directory scheme will be given
+ the chance to try and authenticate the user. Exercise caution
+ when turning this option off. It can be a security risk. Can be
+ used to use two authentication schemes for the same dir. </p>
+-<h2><a name="lowercaseuid"></a> Auth_PG_lowercase_uid</h2>
++<h2><a name="lowercase_uid"></a> Auth_PG_lowercase_uid</h2>
+ <b>Syntax:</b> Auth_PG_lowercase_uid <i>on</i> or <i>off</i><br>
+ <b>Context:</b> directory, .htaccess <br>
+ <b>Override:</b> AuthConfig <br>
+@@ -211,7 +220,7 @@ used to use two authentication schemes for the same dir. </p>
+ user UIDs to lowercase before looking them up. When turned on this does
+ not affect the case of the original user ID should this module decline
+ to authenticate and a lower level is called.</p>
+-<h2><a name="uppercaseuid"></a> Auth_PG_uppercase_uid</h2>
++<h2><a name="uppercase_uid"></a> Auth_PG_uppercase_uid</h2>
+ <b>Syntax:</b> Auth_PG_uppercase_uid <i>on</i> or <i>off</i><br>
+ <b>Context:</b> directory, .htaccess <br>
+ <b>Override:</b> AuthConfig <br>
+@@ -277,14 +286,14 @@ initial space .</em></p>
+ <p>This option allows you to exercise greater control over the SQL code
+ used to retrieve the group name and corresponding user from the
+ database. You can use this to search for the group name
+-using more attributes in the table than the gid_field. </p>
++using more attributes in the table than the grp_group_field. </p>
+ <p>The basic SQL statement used to retrieve a group name and user name
+ for checking looks like this: </p>
+ <ul>
+-select <i>&lt;uid_field&gt;</i> from <i>&lt;grp_table&gt;</i> where <i>
+-&lt;gid_field&gt;</i> ='<i>&lt;required group&gt;</i> '
++select <i>&lt;grp_user_field&gt;</i> from <i>&lt;grp_table&gt;</i> where <i>
++&lt;grp_group_field&gt;</i> ='<i>&lt;required group&gt;</i> '
+ </ul>
+-The gid_whereclause will be added to the end of this statement
++The grp_whereclause will be added to the end of this statement
+ and must fit logically. <em>The where clause must be double
+ quoted.<br>
+ <br>
diff --git a/www-apache/mod_auth_pgsql/files/mod_auth_pgsql-2.0.3-encoding.patch b/www-apache/mod_auth_pgsql/files/mod_auth_pgsql-2.0.3-encoding.patch
new file mode 100644
index 000000000000..959a97b562e2
--- /dev/null
+++ b/www-apache/mod_auth_pgsql/files/mod_auth_pgsql-2.0.3-encoding.patch
@@ -0,0 +1,283 @@
+From: Marco Nenciarini <mnencia@debian.org>
+Date: Sat, 10 Aug 2013 16:26:41 +0200
+Subject: encoding
+
+---
+ mod_auth_pgsql.c | 144 +++++++++++++++++++++++++++++++---------------------
+ mod_auth_pgsql.html | 9 ++++
+ 2 files changed, 94 insertions(+), 59 deletions(-)
+
+diff --git a/mod_auth_pgsql.c b/mod_auth_pgsql.c
+index f13c166..639537d 100644
+--- a/mod_auth_pgsql.c
++++ b/mod_auth_pgsql.c
+@@ -151,6 +151,7 @@ typedef struct {
+ const char *auth_pg_port;
+ const char *auth_pg_options;
+ const char *auth_pg_user;
++ const char *auth_pg_charset;
+ const char *auth_pg_pwd;
+ const char *auth_pg_pwd_table;
+ const char *auth_pg_uname_field;
+@@ -181,6 +182,8 @@ typedef struct {
+
+ } pg_auth_config_rec;
+
++static PGconn *pg_conn;
++
+ static apr_pool_t *auth_pgsql_pool = NULL;
+ static apr_pool_t *auth_pgsql_pool_base64 = NULL;
+
+@@ -220,6 +223,7 @@ static void *create_pg_auth_dir_config(apr_pool_t * p, char *d)
+ new_rec->auth_pg_port = NULL;
+ new_rec->auth_pg_options = NULL;
+ new_rec->auth_pg_user = NULL;
++ new_rec->auth_pg_charset = NULL;
+ new_rec->auth_pg_pwd = NULL;
+ new_rec->auth_pg_pwd_table = NULL;
+ new_rec->auth_pg_uname_field = NULL;
+@@ -324,6 +328,10 @@ static const command_rec pg_auth_cmds[] = {
+ (void *) APR_OFFSETOF(pg_auth_config_rec, auth_pg_user),
+ OR_AUTHCFG,
+ "user name connect as"),
++ AP_INIT_TAKE1("Auth_PG_charset", ap_set_string_slot,
++ (void *) APR_OFFSETOF(pg_auth_config_rec, auth_pg_charset),
++ OR_AUTHCFG,
++ "charset to use for connection"),
+ AP_INIT_TAKE1("Auth_PG_pwd", ap_set_string_slot,
+ (void *) APR_OFFSETOF(pg_auth_config_rec, auth_pg_pwd),
+ OR_AUTHCFG,
+@@ -462,53 +470,51 @@ static char *auth_pg_base64(char *pw)
+ }
+
+
++PGconn *pg_connect(pg_auth_config_rec *sec)
++{
++ PGconn *conn;
+
+-/* Got from POstgreSQL 7.2 */
+-/* ---------------
+- * Escaping arbitrary strings to get valid SQL strings/identifiers.
+- *
+- * Replaces "\\" with "\\\\" and "'" with "''".
+- * length is the length of the buffer pointed to by
+- * from. The buffer at to must be at least 2*length + 1 characters
+- * long. A terminating NUL character is written.
+- * ---------------
+- */
++ conn = PQsetdbLogin(sec->auth_pg_host, sec->auth_pg_port,
++ sec->auth_pg_options, NULL, sec->auth_pg_database,
++ sec->auth_pg_user, sec->auth_pg_pwd);
++ if (PQstatus(conn) != CONNECTION_OK) {
++ PQreset(conn);
++ apr_snprintf(pg_errstr, MAX_STRING_LEN,
++ "mod_auth_pgsql database connection error resetting %s",
++ PQerrorMessage(conn));
++ if (PQstatus(conn) != CONNECTION_OK) {
++ apr_snprintf(pg_errstr, MAX_STRING_LEN,
++ "mod_auth_pgsql database connection error reset failed %s",
++ PQerrorMessage(conn));
++ PQfinish(conn);
++ return NULL;
++ }
++ }
++ return conn;
++}
+
+-static size_t pg_check_string(char *to, const char *from, size_t length)
+-{
+- const char *source = from;
+- char *target = to;
+- unsigned int remaining = length;
+-
+- while (remaining > 0) {
+- switch (*source) {
+- case '\\':
+- *target = '\\';
+- target++;
+- *target = '\\';
+- /* target and remaining are updated below. */
+- break;
+
+- case '\'':
+- *target = '\'';
+- target++;
+- *target = '\'';
+- /* target and remaining are updated below. */
+- break;
++static size_t pg_check_string(char *to, const char *from, size_t length, request_rec * r, pg_auth_config_rec *sec)
++{
++ int error;
+
+- default:
+- *target = *source;
+- /* target and remaining are updated below. */
++ if (!pg_conn) {
++ if (!(pg_conn = pg_connect(sec))) {
++ ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, "[mod_auth_pgsql.c] - cannot connect to database");
++ ap_note_basic_auth_failure(r);
++ return -1;
+ }
+- source++;
+- target++;
+- remaining--;
+ }
+
+- /* Write the terminating NUL character. */
+- *target = '\0';
++ PQescapeStringConn(pg_conn, to, from, length, &error);
++
++ if (error) {
++ ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, "[mod_auth_pgsql.c] - cannot escape string");
++ ap_note_basic_auth_failure(r);
++ return -1;
++ }
+
+- return target - to;
++ return 0;
+ }
+
+
+@@ -518,7 +524,6 @@ static size_t pg_check_string(char *to, const char *from, size_t length)
+ char *do_pg_query(request_rec * r, char *query, pg_auth_config_rec * sec)
+ {
+ PGresult *pg_result;
+- PGconn *pg_conn;
+ char *val;
+ char *result = NULL;
+
+@@ -530,19 +535,10 @@ char *do_pg_query(request_rec * r, char *query, pg_auth_config_rec * sec)
+ sec->auth_pg_database);
+ #endif /* DEBUG_AUTH_PGSQL */
+
+- pg_conn = PQsetdbLogin(sec->auth_pg_host, sec->auth_pg_port,
+- sec->auth_pg_options, NULL, sec->auth_pg_database,
+- sec->auth_pg_user, sec->auth_pg_pwd);
+- if (PQstatus(pg_conn) != CONNECTION_OK) {
+- PQreset(pg_conn);
+- apr_snprintf(pg_errstr, MAX_STRING_LEN,
+- "mod_auth_pgsql database connection error resetting %s",
+- PQerrorMessage(pg_conn));
+- if (PQstatus(pg_conn) != CONNECTION_OK) {
+- apr_snprintf(pg_errstr, MAX_STRING_LEN,
+- "mod_auth_pgsql database connection error reset failed %s",
+- PQerrorMessage(pg_conn));
+- PQfinish(pg_conn);
++ if (!pg_conn) {
++ if (!(pg_conn = pg_connect(sec))) {
++ ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, "[mod_auth_pgsql.c] - cannot connect to database");
++ ap_note_basic_auth_failure(r);
+ return NULL;
+ }
+ }
+@@ -552,6 +548,21 @@ char *do_pg_query(request_rec * r, char *query, pg_auth_config_rec * sec)
+ query);
+ #endif /* DEBUG_AUTH_PGSQL */
+
++ if (sec->auth_pg_charset) {
++ const char *check;
++
++ PQsetClientEncoding(pg_conn, sec->auth_pg_charset);
++
++ check = pg_encoding_to_char(PQclientEncoding(pg_conn));
++
++ if (!check || strcmp(sec->auth_pg_charset, check)) {
++ apr_snprintf(pg_errstr, MAX_STRING_LEN,
++ "mod_auth_pgsql database character set encoding %s");
++ PQfinish(pg_conn);
++ return NULL;
++ }
++ }
++
+ pg_result = PQexec(pg_conn, query);
+
+ if (pg_result == NULL) {
+@@ -610,7 +621,7 @@ char *get_pg_pw(request_rec * r, char *user, pg_auth_config_rec * sec)
+ int n;
+
+ safe_user = apr_palloc(r->pool, 1 + 2 * strlen(user));
+- pg_check_string(safe_user, user, strlen(user));
++ pg_check_string(safe_user, user, strlen(user), r, sec);
+
+ #ifdef DEBUG_AUTH_PGSQL
+ ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r,
+@@ -685,8 +696,8 @@ static char *get_pg_grp(request_rec * r, char *group, char *user,
+ #endif /* DEBUG_AUTH_PGSQL */
+
+ query[0] = '\0';
+- pg_check_string(safe_user, user, strlen(user));
+- pg_check_string(safe_group, group, strlen(group));
++ pg_check_string(safe_user, user, strlen(user), r, sec);
++ pg_check_string(safe_group, group, strlen(group), r, sec);
+
+ if ((!sec->auth_pg_grp_table) ||
+ (!sec->auth_pg_grp_group_field) || (!sec->auth_pg_grp_user_field))
+@@ -777,6 +788,14 @@ static int pg_authenticate_basic_user(request_rec * r)
+ }
+ pg_errstr[0] = '\0';
+
++ if (!pg_conn) {
++ if (!(pg_conn = pg_connect(sec))) {
++ ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, "[mod_auth_pgsql.c] - cannot connect to database");
++ ap_note_basic_auth_failure(r);
++ return HTTP_UNAUTHORIZED;
++ }
++ }
++
+ if (sec->auth_pg_cache_passwords
+ && (!apr_is_empty_table(sec->cache_pass_table))) {
+ val = (char *) apr_table_get(sec->cache_pass_table, user);
+@@ -904,6 +923,13 @@ static int pg_check_auth(request_rec * r)
+ #endif /* DEBUG_AUTH_PGSQL */
+
+
++ if (!pg_conn) {
++ if (!(pg_conn = pg_connect(sec))) {
++ ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, "[mod_auth_pgsql.c] - cannot connect to database");
++ ap_note_basic_auth_failure(r);
++ return HTTP_UNAUTHORIZED;
++ }
++ }
+
+ /* if we cannot do it; leave it to some other guy
+ */
+@@ -1015,9 +1041,9 @@ pg_log_auth_user(request_rec * r, pg_auth_config_rec * sec, char *user,
+ }
+
+ /* AUD: MAX_STRING_LEN probably isn't always correct */
+- pg_check_string(safe_user, user, strlen(user));
+- pg_check_string(safe_pw, sent_pw, strlen(sent_pw));
+- pg_check_string(safe_req, r->the_request, strlen(r->the_request));
++ pg_check_string(safe_user, user, strlen(user), r, sec);
++ pg_check_string(safe_pw, sent_pw, strlen(sent_pw), r, sec);
++ pg_check_string(safe_req, r->the_request, strlen(r->the_request), r, sec);
+
+
+ if (sec->auth_pg_lowercaseuid) {
+diff --git a/mod_auth_pgsql.html b/mod_auth_pgsql.html
+index d35768b..5474314 100644
+--- a/mod_auth_pgsql.html
++++ b/mod_auth_pgsql.html
+@@ -48,6 +48,7 @@ Notes</a> |<a href="#Changelog"> Changelog</a> </p>
+ <li><a href="#host">Auth_PG_host</a> </li>
+ <li><a href="#port">Auth_PG_port</a> </li>
+ <li><a href="#options">Auth_PG_options</a> </li>
++ <li><a href="#charset">Auth_PG_charset</a> </li>
+ <li><a href="#database">Auth_PG_database</a> </li>
+ <li><a href="#user">Auth_PG_user</a> </li>
+ <li><a href="#pwd">Auth_PG_pwd</a> </li>
+@@ -104,6 +105,14 @@ be found. </p>
+ <p>Specifies an option string to be passed to the postgreSQL backend
+ process. Refer to the PostgreSQL user manual for a description of the
+ available options. </p>
++<h2><a name="charset"></a> Auth_PG_charset</h2>
++<b>Syntax:</b> Auth_PG_options <i>option string</i><br>
++<b>Context:</b> directory, .htaccess <br>
++<b>Override:</b> AuthConfig <br>
++<b>Status:</b> Extension
++<p>Specifies the name of an encoding to be set for the PostgreSQL
++backend process. Refer to the PostgreSQL user manual for a description
++of the available options. </p>
+ <h2><a name="database"></a> Auth_PG_database</h2>
+ <b>Syntax:</b> Auth_PG_database <i>database name</i><br>
+ <b>Context:</b> directory, .htaccess <br>
diff --git a/www-apache/mod_auth_pgsql/files/mod_auth_pgsql-2.0.3-fixdoublefree.patch b/www-apache/mod_auth_pgsql/files/mod_auth_pgsql-2.0.3-fixdoublefree.patch
new file mode 100644
index 000000000000..c7314771f37c
--- /dev/null
+++ b/www-apache/mod_auth_pgsql/files/mod_auth_pgsql-2.0.3-fixdoublefree.patch
@@ -0,0 +1,87 @@
+Description: Avoid double free of connection pointers
+ .
+ libapache2-mod-auth-pgsql (2.0.3-6.1) unstable; urgency=medium
+ .
+ * Non-maintainer upload.
+ * Apply patch from Launchpad to set freed pointers to NULL before
+ subsequent checks against NULL. (Closes: #774313)
+Author: Neil Williams <codehelp@debian.org>
+Bug-Debian: https://bugs.debian.org/774313
+Origin: ubuntu, https://launchpadlibrarian.net/177475074/doublefree.patch
+
+---
+
+--- libapache2-mod-auth-pgsql-2.0.3.orig/mod_auth_pgsql.c
++++ libapache2-mod-auth-pgsql-2.0.3/mod_auth_pgsql.c
+@@ -489,6 +489,7 @@ PGconn *pg_connect(pg_auth_config_rec *s
+ "mod_auth_pgsql database connection error reset failed %s",
+ PQerrorMessage(conn));
+ PQfinish(conn);
++ conn = NULL;
+ return NULL;
+ }
+ }
+@@ -562,6 +563,7 @@ char *do_pg_query(request_rec * r, char
+ "mod_auth_pgsql database character set encoding %s",
+ check);
+ PQfinish(pg_conn);
++ pg_conn = NULL;
+ return NULL;
+ }
+ }
+@@ -573,12 +575,15 @@ char *do_pg_query(request_rec * r, char
+ "PGSQL 2: %s -- Query: %s ",
+ PQerrorMessage(pg_conn), query);
+ PQfinish(pg_conn);
++ pg_conn = NULL;
+ return NULL;
+ }
+
+ if (PQresultStatus(pg_result) == PGRES_EMPTY_QUERY) {
+ PQclear(pg_result);
++ pg_result = NULL;
+ PQfinish(pg_conn);
++ pg_conn = NULL;
+ return NULL;
+ }
+
+@@ -586,7 +591,9 @@ char *do_pg_query(request_rec * r, char
+ apr_snprintf(pg_errstr, MAX_STRING_LEN, "PGSQL 3: %s -- Query: %s",
+ PQerrorMessage(pg_conn), query);
+ PQclear(pg_result);
++ pg_result = NULL;
+ PQfinish(pg_conn);
++ pg_conn = NULL;
+ return NULL;
+ }
+
+@@ -596,7 +603,9 @@ char *do_pg_query(request_rec * r, char
+ apr_snprintf(pg_errstr, MAX_STRING_LEN, "PGSQL 4: %s",
+ PQerrorMessage(pg_conn));
+ PQclear(pg_result);
++ pg_result = NULL;
+ PQfinish(pg_conn);
++ pg_conn = NULL;
+ return NULL;
+ }
+
+@@ -604,7 +613,9 @@ char *do_pg_query(request_rec * r, char
+ apr_snprintf(pg_errstr, MAX_STRING_LEN,
+ "Could not get memory for Postgres query.");
+ PQclear(pg_result);
++ pg_result = NULL;
+ PQfinish(pg_conn);
++ pg_conn = NULL;
+ return NULL;
+ }
+
+@@ -613,7 +624,9 @@ char *do_pg_query(request_rec * r, char
+
+ /* ignore errors here ! */
+ PQclear(pg_result);
++ pg_result = NULL;
+ PQfinish(pg_conn);
++ pg_conn = NULL;
+ return result;
+ }
+
diff --git a/www-apache/mod_auth_pgsql/metadata.xml b/www-apache/mod_auth_pgsql/metadata.xml
new file mode 100644
index 000000000000..d06e452b35af
--- /dev/null
+++ b/www-apache/mod_auth_pgsql/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>postgresql</herd>
+</pkgmetadata>
diff --git a/www-apache/mod_auth_pgsql/mod_auth_pgsql-2.0.3-r1.ebuild b/www-apache/mod_auth_pgsql/mod_auth_pgsql-2.0.3-r1.ebuild
new file mode 100644
index 000000000000..26ec2e65c9cc
--- /dev/null
+++ b/www-apache/mod_auth_pgsql/mod_auth_pgsql-2.0.3-r1.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit apache-module multilib
+
+DESCRIPTION="This module allows user authentication against information stored in a PostgreSQL database"
+HOMEPAGE="http://www.giuseppetanzilli.it/mod_auth_pgsql2/"
+SRC_URI="http://www.giuseppetanzilli.it/mod_auth_pgsql2/dist/${P}.tar.gz"
+
+LICENSE="freedist"
+SLOT="2"
+KEYWORDS="amd64 ppc ~sparc x86"
+IUSE=""
+
+DEPEND="dev-db/postgresql"
+RDEPEND="${DEPEND}"
+
+APXS2_ARGS="-a -c -I/usr/include/postgresql -L/usr/$(get_libdir)/postgresql -lpq mod_auth_pgsql.c"
+
+APACHE2_MOD_CONF="80_mod_auth_pgsql"
+APACHE2_MOD_DEFINE="AUTH_PGSQL"
+
+DOCFILES="INSTALL README mod_auth_pgsql.html"
+
+need_apache2_2
+
+src_install() {
+ apache-module_src_install
+ fperms 600 "${APACHE_MODULES_CONFDIR}"/${APACHE2_MOD_CONF}.conf
+}
diff --git a/www-apache/mod_auth_pgsql/mod_auth_pgsql-2.0.3-r2.ebuild b/www-apache/mod_auth_pgsql/mod_auth_pgsql-2.0.3-r2.ebuild
new file mode 100644
index 000000000000..4876dc317765
--- /dev/null
+++ b/www-apache/mod_auth_pgsql/mod_auth_pgsql-2.0.3-r2.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils apache-module multilib
+
+DESCRIPTION="This module allows user authentication against information stored in a PostgreSQL database"
+HOMEPAGE="http://www.giuseppetanzilli.it/mod_auth_pgsql2/"
+SRC_URI="http://www.giuseppetanzilli.it/mod_auth_pgsql2/dist/${P}.tar.gz"
+
+LICENSE="freedist"
+SLOT="2"
+KEYWORDS="~amd64 ~ppc ~sparc ~x86"
+IUSE=""
+
+DEPEND="dev-db/postgresql:*"
+RDEPEND="${DEPEND}"
+
+APXS2_ARGS="-a -c -I/usr/include/postgresql -L/usr/$(get_libdir)/postgresql -lpq mod_auth_pgsql.c"
+
+APACHE2_MOD_CONF="80_mod_auth_pgsql"
+APACHE2_MOD_DEFINE="AUTH_PGSQL"
+
+DOCFILES="INSTALL README mod_auth_pgsql.html"
+
+need_apache2_4
+
+src_prepare() {
+ # Debian patches
+ epatch "${FILESDIR}"/${P}-documentation.patch
+ epatch "${FILESDIR}"/${P}-encoding.patch
+ epatch "${FILESDIR}"/${P}-apache-2.4.patch
+ epatch "${FILESDIR}"/${P}-fixdoublefree.patch
+}
+
+src_install() {
+ apache-module_src_install
+ fperms 600 "${APACHE_MODULES_CONFDIR}"/${APACHE2_MOD_CONF}.conf
+}
diff --git a/www-apache/mod_auth_radius/Manifest b/www-apache/mod_auth_radius/Manifest
new file mode 100644
index 000000000000..8b66fcde8259
--- /dev/null
+++ b/www-apache/mod_auth_radius/Manifest
@@ -0,0 +1 @@
+DIST mod_auth_radius-1.5.8.tar 122880 SHA256 6a16cb64c8e3da5ccef5db007d3ab3fa53274bdb37c5f6b1821a12de42aa6d93 SHA512 0fcc43a44ea17b33595a850abb03ff6b92e100dfbeffc82caa9516f6eb7914fb463cb62286d624203a2c7035d05a107dda7b68c5cedf7de3b8be95b9266b6988 WHIRLPOOL 15ffe4db98758e0ef41390f46e97f686ed678b9358347de3b3257ba8d0fac9623935563040a0138c8c81179deb8dca0f998f90441c8b538d45e14548fbc97403
diff --git a/www-apache/mod_auth_radius/files/1.5.8-includes.patch b/www-apache/mod_auth_radius/files/1.5.8-includes.patch
new file mode 100644
index 000000000000..b1482c5f9bee
--- /dev/null
+++ b/www-apache/mod_auth_radius/files/1.5.8-includes.patch
@@ -0,0 +1,25 @@
+diff -uNr mod_auth_radius-1.5.8.ORIG/mod_auth_radius-2.0.c mod_auth_radius-1.5.8/mod_auth_radius-2.0.c
+--- mod_auth_radius-1.5.8.ORIG/mod_auth_radius-2.0.c 2013-05-08 14:26:19.103330264 +0100
++++ mod_auth_radius-1.5.8/mod_auth_radius-2.0.c 2013-05-08 14:29:40.331333283 +0100
+@@ -287,15 +287,21 @@
+
+ */
+
++#include <arpa/inet.h>
+ #include <netdb.h>
+ #include <openssl/md5.h>
+ #include <sys/stat.h>
++#include <sys/types.h>
++#include <unistd.h>
++#include <sys/socket.h>
++#include <netinet/in.h>
+
+ #include "httpd.h"
+ #include "http_config.h"
+ #include "http_core.h"
+ #include "http_log.h"
+ #include "http_protocol.h"
++#include "http_request.h"
+ #include "util_md5.h"
+ #include "apr_general.h"
+ #include "apr_tables.h"
diff --git a/www-apache/mod_auth_radius/files/1.5.8-remote_ip-obsolete.patch b/www-apache/mod_auth_radius/files/1.5.8-remote_ip-obsolete.patch
new file mode 100644
index 000000000000..77d0880e8d97
--- /dev/null
+++ b/www-apache/mod_auth_radius/files/1.5.8-remote_ip-obsolete.patch
@@ -0,0 +1,21 @@
+diff -uNr mod_auth_radius-1.5.8.ORIG/mod_auth_radius-2.0.c mod_auth_radius-1.5.8/mod_auth_radius-2.0.c
+--- mod_auth_radius-1.5.8.ORIG/mod_auth_radius-2.0.c 2013-05-08 14:18:02.746322816 +0100
++++ mod_auth_radius-1.5.8/mod_auth_radius-2.0.c 2013-05-08 14:19:03.589323729 +0100
+@@ -683,7 +683,7 @@
+ * benefit here.
+ */
+ apr_snprintf(one, COOKIE_SIZE, "%s%s%s%s%s%08x", scr->secret,
+- r->user, passwd, c->remote_ip, hostname, expires);
++ r->user, passwd, c->client_ip, hostname, expires);
+
+ /* if you're REALLY worried about what's going on */
+
+@@ -691,7 +691,7 @@
+ ap_log_error(APLOG_MARK, APLOG_NOERRNO | APLOG_DEBUG, 0, r->server," secret = %s\n", scr->secret);
+ ap_log_error(APLOG_MARK, APLOG_NOERRNO | APLOG_DEBUG, 0, r->server," user = %s\n", r->user);
+ ap_log_error(APLOG_MARK, APLOG_NOERRNO | APLOG_DEBUG, 0, r->server," passwd = %s\n", passwd);
+- ap_log_error(APLOG_MARK, APLOG_NOERRNO | APLOG_DEBUG, 0, r->server," remote ip = %s\n", c->remote_ip);
++ ap_log_error(APLOG_MARK, APLOG_NOERRNO | APLOG_DEBUG, 0, r->server," remote ip = %s\n", c->client_ip);
+ ap_log_error(APLOG_MARK, APLOG_NOERRNO | APLOG_DEBUG, 0, r->server," hostname = %s\n", hostname);
+ ap_log_error(APLOG_MARK, APLOG_NOERRNO | APLOG_DEBUG, 0, r->server," expiry = %08x\n", expires);
+ #endif
diff --git a/www-apache/mod_auth_radius/metadata.xml b/www-apache/mod_auth_radius/metadata.xml
new file mode 100644
index 000000000000..3ed4669f55a4
--- /dev/null
+++ b/www-apache/mod_auth_radius/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>chainsaw@gentoo.org</email>
+ <name>Tony Vroon</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/www-apache/mod_auth_radius/mod_auth_radius-1.5.8.ebuild b/www-apache/mod_auth_radius/mod_auth_radius-1.5.8.ebuild
new file mode 100644
index 000000000000..d9227ff7fe97
--- /dev/null
+++ b/www-apache/mod_auth_radius/mod_auth_radius-1.5.8.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit apache-module eutils
+
+DESCRIPTION="Radius authentication for Apache"
+HOMEPAGE="http://freeradius.org/mod_auth_radius/"
+SRC_URI="ftp://ftp.freeradius.org/pub/radius/${P}.tar"
+
+LICENSE="Apache-2.0"
+KEYWORDS="~amd64"
+SLOT="0"
+IUSE=""
+
+APACHE2_MOD_FILE=".libs/mod_auth_radius-2.0.so"
+APACHE2_MOD_DEFINE="AUTH_RADIUS"
+
+APXS2_ARGS="-c ${PN}-2.0.c"
+
+DOCFILES="README"
+
+need_apache2
+
+src_prepare() {
+ epatch "${FILESDIR}/${PV}-includes.patch"
+ if has_version ">=www-servers/apache-2.4"; then
+ epatch "${FILESDIR}/${PV}-remote_ip-obsolete.patch"
+ fi
+}
+
+src_compile() {
+ apache-module_src_compile
+}
+
+src_install() {
+ apache-module_src_install
+}
diff --git a/www-apache/mod_auth_tkt/Manifest b/www-apache/mod_auth_tkt/Manifest
new file mode 100644
index 000000000000..24ff040b6e2e
--- /dev/null
+++ b/www-apache/mod_auth_tkt/Manifest
@@ -0,0 +1 @@
+DIST mod_auth_tkt-2.1.0.tar.gz 100731 SHA256 ba456531656be5682f0a6a632a6eccb98c2459753c59b80b843e1d19cc7f8724 SHA512 e99ed60dbe2deebd654c4c849b20f7aa929ab476b9142e3da1aad8468b4922f4c36d30086396bb15676a3dc3e4ad9ac97e3524d1c70c6f18cea4c436174463b0 WHIRLPOOL f8fde3b318a1cd236e07baa23c39e6d5f6873c6097a54df438bc114383049c67b6db73789eab23fa8b8d8dee738424c8d832f9f286010d33a5e8b07565292f7c
diff --git a/www-apache/mod_auth_tkt/files/10_mod_auth_tkt.conf b/www-apache/mod_auth_tkt/files/10_mod_auth_tkt.conf
new file mode 100644
index 000000000000..4fe66cc90b5f
--- /dev/null
+++ b/www-apache/mod_auth_tkt/files/10_mod_auth_tkt.conf
@@ -0,0 +1,24 @@
+# See 'man mod_auth_tkt' for details on the individual directives.
+<IfDefine AUTH_TKT>
+LoadModule auth_tkt_module modules/mod_auth_tkt.so
+
+# Shared secret - CHANGE THIS before using!
+TKTAuthSecret "672c158d-67b8-42e4-aec7-f1e1abb882bb"
+
+# Used by sample CGI scripts to locate this config file
+SetEnv MOD_AUTH_TKT_CONF "/etc/apache2/modules.d/10_mod_auth_tkt.conf"
+
+# Protected directory example
+#<Directory /var/www/localhost/htdocs>
+# AuthType Basic
+# require valid-user
+# TKTAuthLoginURL https://www.CHANGEME.com/pub/login.cgi
+# # If an internet server, you probably want the following on (at least initially)
+# TKTAuthIgnoreIP on
+# # If you just want *optional* authentication, so that casual users and robots
+# # can still access some content, uncomment the following
+# # TKTAuthGuestLogin on
+#</Directory>
+</IfDefine>
+
+# vim: ts=4 filetype=apache
diff --git a/www-apache/mod_auth_tkt/files/mod_auth_tkt-2.1.0-apache-2.4.patch b/www-apache/mod_auth_tkt/files/mod_auth_tkt-2.1.0-apache-2.4.patch
new file mode 100644
index 000000000000..af7cc2475169
--- /dev/null
+++ b/www-apache/mod_auth_tkt/files/mod_auth_tkt-2.1.0-apache-2.4.patch
@@ -0,0 +1,40 @@
+Description: Build fix for apache 2.4
+ Fix for API changes in apache 2.4.
+Author: Ivo De Decker <ivo.dedecker@ugent.be>
+Forwarded: http://sourceforge.net/mailarchive/forum.php?thread_name=20120518111425.GA9186%40ugent.be&forum_name=modauthtkt-users
+Last-Update: 2012-05-17
+
+--- libapache2-mod-auth-tkt-2.1.0.orig/src/mod_auth_tkt.c
++++ libapache2-mod-auth-tkt-2.1.0/src/mod_auth_tkt.c
+@@ -6,6 +6,7 @@
+ #include "http_config.h"
+ #include "http_log.h"
+ #include "http_core.h"
++#include "http_request.h"
+ #include "http_protocol.h"
+ #include "util_md5.h"
+ #include "sha2.h"
+@@ -798,7 +799,11 @@ ticket_digest(request_rec *r, auth_tkt *
+ unsigned char *buf2 = apr_palloc(r->pool, sconf->digest_sz + strlen(secret));
+ int len = 0;
+ char *digest = NULL;
++#if AP_MODULE_MAGIC_AT_LEAST(20111130,0)
++ char *remote_ip = conf->ignore_ip > 0 ? "0.0.0.0" : r->connection->client_ip;
++#else
+ char *remote_ip = conf->ignore_ip > 0 ? "0.0.0.0" : r->connection->remote_ip;
++#endif
+ unsigned long ip;
+ struct in_addr ia;
+ char *d;
+@@ -1575,7 +1580,11 @@ static void
+ auth_tkt_register_hooks (apr_pool_t *p)
+ {
+ ap_hook_post_config(auth_tkt_version, NULL, NULL, APR_HOOK_MIDDLE);
++#if AP_MODULE_MAGIC_AT_LEAST(20080403,1)
++ ap_hook_check_authn(auth_tkt_check, NULL, NULL, APR_HOOK_FIRST, AP_AUTH_INTERNAL_PER_CONF);
++#else
+ ap_hook_check_user_id(auth_tkt_check, NULL, NULL, APR_HOOK_FIRST);
++#endif
+ }
+
+ /* Declare and populate the main module data structure */
diff --git a/www-apache/mod_auth_tkt/metadata.xml b/www-apache/mod_auth_tkt/metadata.xml
new file mode 100644
index 000000000000..4538a68724a6
--- /dev/null
+++ b/www-apache/mod_auth_tkt/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer><email>maintainer-needed@gentoo.org</email></maintainer>
+</pkgmetadata>
diff --git a/www-apache/mod_auth_tkt/mod_auth_tkt-2.1.0-r1.ebuild b/www-apache/mod_auth_tkt/mod_auth_tkt-2.1.0-r1.ebuild
new file mode 100644
index 000000000000..fdc4d21427e6
--- /dev/null
+++ b/www-apache/mod_auth_tkt/mod_auth_tkt-2.1.0-r1.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit apache-module eutils
+
+DESCRIPTION="Apache module for cookie based authentication"
+HOMEPAGE="http://www.openfusion.com.au/labs/mod_auth_tkt/"
+SRC_URI="http://www.openfusion.com.au/labs/dist/${PN}/${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="dev-lang/perl"
+RDEPEND=""
+
+APACHE2_MOD_CONF="10_${PN}"
+APACHE2_MOD_DEFINE="AUTH_TKT"
+
+DOCFILES="README"
+
+# test suite is completely broken
+RESTRICT="test"
+
+need_apache2
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-apache-2.4.patch
+}
+
+src_configure() {
+ ./configure --apachever=2.2 --apxs=${APXS}
+}
+
+src_compile() {
+ emake
+}
+
+src_install() {
+ apache-module_src_install
+ pod2man --section=5 --release=${PV} doc/${PN}.{pod,5}
+ doman doc/${PN}.5
+}
+
+pkg_postinst() {
+ apache-module_pkg_postinst
+ einfo "See 'man mod_auth_tkt' for details on the individual directives."
+ einfo "Remember to change shared secret 'TKTAuthSecret' before using!"
+ einfo
+}
diff --git a/www-apache/mod_auth_token/Manifest b/www-apache/mod_auth_token/Manifest
new file mode 100644
index 000000000000..e3e4f2a31fdd
--- /dev/null
+++ b/www-apache/mod_auth_token/Manifest
@@ -0,0 +1 @@
+DIST mod_auth_token-1.0.6-beta.tar.gz 555111 SHA256 10888bde6aa42cfce34a593eabe7f582dcabe6fca814e2496c06fdf444334ee9
diff --git a/www-apache/mod_auth_token/files/75_mod_auth_token.conf b/www-apache/mod_auth_token/files/75_mod_auth_token.conf
new file mode 100644
index 000000000000..3962fc66a708
--- /dev/null
+++ b/www-apache/mod_auth_token/files/75_mod_auth_token.conf
@@ -0,0 +1,26 @@
+<IfDefine AUTH_TOKEN>
+
+ LoadModule auth_token_module modules/mod_auth_token.so
+
+ # The token is an hex-encoded MD5 hash of the secret password, relative file
+ # path and the timestamp. It is encoded onto the URI as:
+ # <uri-prefix><token>/<timestamp-in-hex><rel-path
+ # where the token is generated as
+ # md5("secret" + "/path/to/file.txt" + dechex(time_now()))
+ # To add the IP of client into the in the md5 hash, enable AuthTokenLimitByIp.
+
+ #<Location /protected/>
+ #AuthTokenSecret "secret"
+ #AuthTokenPrefix /protected/
+ #AuthTokenTimeout 60
+ #AuthTokenLimitByIp off
+ #</Location>
+
+ # Example:
+ # /protected/dee0ed6174a894113d5e8f6c98f0e92b/43eaf9c5/path/to/file.txt
+ # maps to
+ # /protected/path/to/file.txt
+
+</IfDefine>
+
+# vim: ts=4 filetype=apache \ No newline at end of file
diff --git a/www-apache/mod_auth_token/files/mod_auth_token-1.0.6_beta-ap_pstrcat.patch b/www-apache/mod_auth_token/files/mod_auth_token-1.0.6_beta-ap_pstrcat.patch
new file mode 100644
index 000000000000..54a00e072fa4
--- /dev/null
+++ b/www-apache/mod_auth_token/files/mod_auth_token-1.0.6_beta-ap_pstrcat.patch
@@ -0,0 +1,13 @@
+Index: mod_auth_token/mod_auth_token.c
+===================================================================
+--- mod_auth_token.orig/mod_auth_token.c
++++ mod_auth_token/mod_auth_token.c
+@@ -64,7 +64,7 @@ static const char *auth_token_set_prefix
+ auth_token_config_rec *conf = (auth_token_config_rec*)config;
+
+ if (arg[len - 1] != '/') {
+- ap_set_string_slot(cmd, config, apr_pstrcat(cmd->pool, arg, '/'));
++ ap_set_string_slot(cmd, config, apr_pstrcat(cmd->pool, arg, "/", NULL));
+ conf->prefix_len = len + 1;
+ }
+ else {
diff --git a/www-apache/mod_auth_token/metadata.xml b/www-apache/mod_auth_token/metadata.xml
new file mode 100644
index 000000000000..c594eca9664d
--- /dev/null
+++ b/www-apache/mod_auth_token/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>proxy-maintainers</herd>
+ <maintainer>
+ <email>pavel.stratil-jun@fenix.cz</email>
+ <description>Proxied co-maintainer assign bugs to him</description>
+ </maintainer>
+ <maintainer>
+ <email>flameeyes@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="google-code">mod-auth-token</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/www-apache/mod_auth_token/mod_auth_token-1.0.6_beta.ebuild b/www-apache/mod_auth_token/mod_auth_token-1.0.6_beta.ebuild
new file mode 100644
index 000000000000..4384270ace67
--- /dev/null
+++ b/www-apache/mod_auth_token/mod_auth_token-1.0.6_beta.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=3
+
+inherit apache-module eutils
+
+MY_P="${PN}-${PV/_/-}"
+DESCRIPTION="Token based URI access module for Apache2"
+HOMEPAGE="http://code.google.com/p/mod-auth-token/"
+SRC_URI="http://mod-auth-token.googlecode.com/files/${MY_P}.tar.gz"
+
+KEYWORDS="~amd64"
+LICENSE="Apache-2.0"
+SLOT="0"
+IUSE=""
+
+DEPEND=""
+RDEPEND=""
+
+APACHE2_MOD_CONF="75_${PN}"
+APACHE2_MOD_DEFINE="AUTH_TOKEN"
+
+need_apache2_2
+
+S="${WORKDIR}/${PN}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-ap_pstrcat.patch
+}
+
+src_compile() {
+ local flag=
+ APXS2_ARGS=
+
+ for flag in ${CFLAGS}; do
+ APXS2_ARGS+=" -Wc,${flag}"
+ done
+
+ for flag in ${LDFLAGS}; do
+ APXS2_ARGS+=" -Wl,${flag}"
+ done
+
+ APXS2_ARGS="${APXS2_ARGS} -c ${PN}.c"
+ apache-module_src_compile
+}
diff --git a/www-apache/mod_auth_xradius/Manifest b/www-apache/mod_auth_xradius/Manifest
new file mode 100644
index 000000000000..01a8eea4694c
--- /dev/null
+++ b/www-apache/mod_auth_xradius/Manifest
@@ -0,0 +1 @@
+DIST mod_auth_xradius-0.4.6.tar.bz2 180591 SHA256 ab45f9986e37ca38ef6b8ae765e2baa647529c848c0d21b49abf60cc1e9fbf0b SHA512 7edb26f988f9842825bec1b04f5127816bd53f76d2284d79d87afef2b5d6e9fa8cb8156c3f5543aeb9b013f65295fa70098ade603f00ce6e90b3b0c3e8c41b6a WHIRLPOOL 305cb5d53ee3fe9db7473761a0b4e179ab042e61f88710f7373c8edcb4bde07a6d3cb67f25444ef4bc2e341b6d775fbf59a139532feb18c4f0a0d9488efc7c54
diff --git a/www-apache/mod_auth_xradius/files/0.4.6-apache24-api-changes.diff b/www-apache/mod_auth_xradius/files/0.4.6-apache24-api-changes.diff
new file mode 100644
index 000000000000..a760bd6ce79e
--- /dev/null
+++ b/www-apache/mod_auth_xradius/files/0.4.6-apache24-api-changes.diff
@@ -0,0 +1,14 @@
+--- src/xradius_cache.c.orig 2013-06-10 10:02:53.263071428 +0100
++++ src/xradius_cache.c 2013-06-10 10:03:45.789072216 +0100
+@@ -143,9 +143,9 @@
+ /* Running as Root */
+ if (geteuid() == 0) {
+ /* Allow the configured Apache use to read/write to the DBM */
+- chown(path1, unixd_config.user_id, -1);
++ chown(path1, ap_unixd_config.user_id, -1);
+ if (path2 != NULL) {
+- chown(path2, unixd_config.user_id, -1);
++ chown(path2, ap_unixd_config.user_id, -1);
+ }
+ }
+ #endif
diff --git a/www-apache/mod_auth_xradius/files/0.4.6-fallback-support.diff b/www-apache/mod_auth_xradius/files/0.4.6-fallback-support.diff
new file mode 100644
index 000000000000..da43dc4b2776
--- /dev/null
+++ b/www-apache/mod_auth_xradius/files/0.4.6-fallback-support.diff
@@ -0,0 +1,31 @@
+diff -uNr mod_auth_xradius-0.4.6.ORIG/src/mod_auth_xradius.c mod_auth_xradius-0.4.6/src/mod_auth_xradius.c
+--- mod_auth_xradius-0.4.6.ORIG/src/mod_auth_xradius.c 2014-09-24 13:41:22.990073508 +0100
++++ mod_auth_xradius-0.4.6/src/mod_auth_xradius.c 2014-09-24 13:50:17.204100114 +0100
+@@ -125,15 +125,15 @@
+ rctx = xrad_auth_open();
+
+ /* Loop through the array of RADIUS Servers, adding them to the rctx object */
+- sr = (xrad_server_info *) dc->servers->elts;
+ for (i = 0; i < dc->servers->nelts; ++i) {
+- rc = xrad_add_server(rctx, sr[i].hostname, sr[i].port, sr[i].secret,
++ sr = &(((xrad_server_info*)dc->servers->elts)[i]);
++ rc = xrad_add_server(rctx, sr->hostname, sr->port, sr->secret,
+ dc->timeout, dc->maxtries);
+
+ if (rc != 0) {
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
+ "xradius: Failed to add server '%s:%d': (%d) %s",
+- sr[i].hostname, sr[i].port, rc, xrad_strerror(rctx));
++ sr->hostname, sr->port, rc, xrad_strerror(rctx));
+ goto run_cleanup;
+ }
+ }
+@@ -294,7 +294,7 @@
+ /* To properly use the Pools, this array is allocated from the here, instead of
+ inside the directory configuration creation function. */
+ if (dc->servers == NULL) {
+- dc->servers = apr_array_make(parms->pool, 4, sizeof(xrad_server_info*));
++ dc->servers = apr_array_make(parms->pool, 4, sizeof(xrad_server_info));
+ }
+
+ sr = apr_array_push(dc->servers);
diff --git a/www-apache/mod_auth_xradius/files/0.4.6-obsolete-autotools-syntax.diff b/www-apache/mod_auth_xradius/files/0.4.6-obsolete-autotools-syntax.diff
new file mode 100644
index 000000000000..affb3181485a
--- /dev/null
+++ b/www-apache/mod_auth_xradius/files/0.4.6-obsolete-autotools-syntax.diff
@@ -0,0 +1,19 @@
+--- configure.ac.orig 2013-06-10 09:56:06.905065330 +0100
++++ configure.ac 2013-06-10 09:56:45.968065916 +0100
+@@ -4,6 +4,7 @@
+ AC_PREREQ(2.53)
+ AC_CONFIG_SRCDIR([src/mod_auth_xradius.c])
+ AC_CONFIG_AUX_DIR(config)
++AC_CONFIG_MACRO_DIR([m4])
+ OOO_MAINTAIN_MODE
+ AM_MAINTAINER_MODE
+ AC_CANONICAL_TARGET
+@@ -15,7 +16,7 @@
+ AC_PROG_CC
+ AC_PROG_LD
+ AC_PROG_INSTALL
+-AC_PROG_RANLIB
++LT_INIT
+
+ AP_VERSION=2.0.40
+ CHECK_APACHE(,$AP_VERSION,
diff --git a/www-apache/mod_auth_xradius/metadata.xml b/www-apache/mod_auth_xradius/metadata.xml
new file mode 100644
index 000000000000..3ed4669f55a4
--- /dev/null
+++ b/www-apache/mod_auth_xradius/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>chainsaw@gentoo.org</email>
+ <name>Tony Vroon</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/www-apache/mod_auth_xradius/mod_auth_xradius-0.4.6-r1.ebuild b/www-apache/mod_auth_xradius/mod_auth_xradius-0.4.6-r1.ebuild
new file mode 100644
index 000000000000..9d9eab775e06
--- /dev/null
+++ b/www-apache/mod_auth_xradius/mod_auth_xradius-0.4.6-r1.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit autotools eutils
+
+DESCRIPTION="Radius authentication for Apache"
+HOMEPAGE="http://www.outoforder.cc/projects/apache/mod_auth_xradius/"
+SRC_URI="http://www.outoforder.cc/downloads/${PN}/${P}.tar.bz2"
+
+LICENSE="Apache-2.0"
+KEYWORDS="~amd64"
+SLOT="0"
+IUSE=""
+
+DEPEND="www-servers/apache"
+DOCFILES="README"
+
+src_prepare() {
+ epatch "${FILESDIR}/${PV}-obsolete-autotools-syntax.diff"
+ epatch "${FILESDIR}/${PV}-fallback-support.diff"
+ if has_version ">=www-servers/apache-2.4"; then
+ epatch "${FILESDIR}/${PV}-apache24-api-changes.diff"
+ fi
+ AT_M4DIR="m4" eautoreconf
+}
diff --git a/www-apache/mod_auth_xradius/mod_auth_xradius-0.4.6.ebuild b/www-apache/mod_auth_xradius/mod_auth_xradius-0.4.6.ebuild
new file mode 100644
index 000000000000..bbeb0003438d
--- /dev/null
+++ b/www-apache/mod_auth_xradius/mod_auth_xradius-0.4.6.ebuild
@@ -0,0 +1,26 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit autotools eutils
+
+DESCRIPTION="Radius authentication for Apache"
+HOMEPAGE="http://www.outoforder.cc/projects/apache/mod_auth_xradius/"
+SRC_URI="http://www.outoforder.cc/downloads/${PN}/${P}.tar.bz2"
+
+LICENSE="Apache-2.0"
+KEYWORDS="~amd64"
+SLOT="0"
+IUSE=""
+
+DOCFILES="README"
+
+src_prepare() {
+ epatch "${FILESDIR}/${PV}-obsolete-autotools-syntax.diff"
+ if has_version ">=www-servers/apache-2.4"; then
+ epatch "${FILESDIR}/${PV}-apache24-api-changes.diff"
+ fi
+ AT_M4DIR="m4" eautoreconf
+}
diff --git a/www-apache/mod_authn_sasl/Manifest b/www-apache/mod_authn_sasl/Manifest
new file mode 100644
index 000000000000..2da77b9db5a1
--- /dev/null
+++ b/www-apache/mod_authn_sasl/Manifest
@@ -0,0 +1 @@
+DIST mod_authn_sasl-1.2.tar.bz2 274790 SHA256 4329e1f429560041cebe67b74a588330f382759bcbb91d3e4145b18e59734b57 SHA512 cc967d350c7110f98b56fa94244473dd2cfc813e7992d7aa8a0ae2219264834b1e2218a1f0982bad661e335bfd713cfb9e8efa6ab69f07a309370e4b7d74ef02 WHIRLPOOL e906277df03d5027f9911d62f47d06ecff0bdb4a230b326c0d4361129bdf0358fd665c2e4c9b1ed54f79aa51fc02bae1edde4132369dee897c5ef86bd49e9fe8
diff --git a/www-apache/mod_authn_sasl/files/10_mod_authn_sasl.conf b/www-apache/mod_authn_sasl/files/10_mod_authn_sasl.conf
new file mode 100644
index 000000000000..05f71c156e41
--- /dev/null
+++ b/www-apache/mod_authn_sasl/files/10_mod_authn_sasl.conf
@@ -0,0 +1,5 @@
+<IfDefine AUTHN_SASL>
+LoadModule authn_sasl_module modules/mod_authn_sasl.so
+</IfDefine>
+
+# vim: ts=4 filetype=apache
diff --git a/www-apache/mod_authn_sasl/metadata.xml b/www-apache/mod_authn_sasl/metadata.xml
new file mode 100644
index 000000000000..4538a68724a6
--- /dev/null
+++ b/www-apache/mod_authn_sasl/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer><email>maintainer-needed@gentoo.org</email></maintainer>
+</pkgmetadata>
diff --git a/www-apache/mod_authn_sasl/mod_authn_sasl-1.2.ebuild b/www-apache/mod_authn_sasl/mod_authn_sasl-1.2.ebuild
new file mode 100644
index 000000000000..7d038d1a0ab4
--- /dev/null
+++ b/www-apache/mod_authn_sasl/mod_authn_sasl-1.2.ebuild
@@ -0,0 +1,27 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils apache-module
+
+DESCRIPTION="Cyrus SASL authentication module for Apache"
+HOMEPAGE="http://mod-authn-sasl.sourceforge.net/"
+SRC_URI="http://downloads.sourceforge.net/project/mod-authn-sasl/mod-authn-sasl/${PV}/${P}.tar.bz2"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE=""
+
+DEPEND="dev-libs/cyrus-sasl"
+RDEPEND="${DEPEND}"
+
+APXS2_ARGS="-c ${PN}.c -lsasl2"
+APACHE2_MOD_CONF="10_${PN}"
+APACHE2_MOD_DEFINE="AUTHN_SASL"
+
+need_apache2
+
+src_install() {
+ apache-module_src_install
+}
diff --git a/www-apache/mod_authnz_external/Manifest b/www-apache/mod_authnz_external/Manifest
new file mode 100644
index 000000000000..ad0c7dd4715a
--- /dev/null
+++ b/www-apache/mod_authnz_external/Manifest
@@ -0,0 +1,2 @@
+DIST mod_authnz_external-3.2.6.tar.gz 38194 SHA256 67365145100617647c65ec7778cdfea2e12eb70e61bb8cddb5d90abd7979f5e6
+DIST mod_authnz_external-3.3.2.tar.gz 36160 SHA256 a16b31d81c20e024e7efe480fe98b48d5ce40d520b0a13ff38ab003cc527f1e8 SHA512 8216744dbaed8dbde0d33658e38594463409e613412bd94f3e5f5a816f5e793a395ddda7c582ff1d1e69e48efdd1efb48c168d4cbc37cc7807a0dcb92eace0be WHIRLPOOL 34407a3a62d2bb4ca67fbc08bafff145ed5a52308a13e6e4b21d0b2d774b34e2a2980839d9d4bc145f1197038fe7bcd8674a7bd434f0119e39e1a5fa0a4d1d71
diff --git a/www-apache/mod_authnz_external/files/10_mod_authnz_external.conf b/www-apache/mod_authnz_external/files/10_mod_authnz_external.conf
new file mode 100644
index 000000000000..fc59272caa0e
--- /dev/null
+++ b/www-apache/mod_authnz_external/files/10_mod_authnz_external.conf
@@ -0,0 +1,34 @@
+<IfDefine AUTHNZ_EXTERNAL>
+LoadModule authnz_external_module modules/mod_authnz_external.so
+
+# provided by net-www/pwauth
+#AddExternalAuth pwauth /etc/apache2/modules/pwauth
+#SetExternalAuthMethod pwauth pipe
+
+# For external group check (provided by net-www/pwauth)
+#AddExternalGroup unixgroup modules/unixgroup
+#SetExternalGroupMethod unixgroup environment
+
+# Put an .htaccess file in whatever directory you want to protect.
+# A typical .htaccess file would look like:
+#
+# AuthName Your-Site-Name
+# AuthType Basic
+# AuthExternal pwauth
+# Require valid-user
+# or
+# Require user1
+#
+# GroupExternal unixgroup
+# AuthGroupFile /dev/null
+# Require group <groupname1> <groupname2> ...
+#
+# Alternately, you can put a <Directory> block with the same directives
+# in your httpd.conf file.
+#
+# Note1: Using group method, don't forget to add users in the authorized group
+# group files
+# somegroup:x:500:user1,user2,user3
+</IfDefine>
+
+# vim: ts=4 filetype=apache
diff --git a/www-apache/mod_authnz_external/metadata.xml b/www-apache/mod_authnz_external/metadata.xml
new file mode 100644
index 000000000000..ba08acf34594
--- /dev/null
+++ b/www-apache/mod_authnz_external/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer><email>maintainer-needed@gentoo.org</email></maintainer>
+ <upstream>
+ <remote-id type="google-code">mod-auth-external</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/www-apache/mod_authnz_external/mod_authnz_external-3.2.6.ebuild b/www-apache/mod_authnz_external/mod_authnz_external-3.2.6.ebuild
new file mode 100644
index 000000000000..8a2aa2d257b7
--- /dev/null
+++ b/www-apache/mod_authnz_external/mod_authnz_external-3.2.6.ebuild
@@ -0,0 +1,24 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils apache-module
+
+DESCRIPTION="An Apache2 authentication DSO using external programs"
+HOMEPAGE="http://code.google.com/p/mod-auth-external/"
+SRC_URI="http://mod-auth-external.googlecode.com/files/${P}.tar.gz"
+
+LICENSE="Apache-1.1"
+SLOT="2"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND=""
+
+DOCFILES="AUTHENTICATORS CHANGES INSTALL INSTALL.HARDCODE README TODO UPGRADE"
+
+APACHE2_MOD_CONF="10_${PN}"
+APACHE2_MOD_DEFINE="AUTHNZ_EXTERNAL"
+
+need_apache2_2
diff --git a/www-apache/mod_authnz_external/mod_authnz_external-3.3.2.ebuild b/www-apache/mod_authnz_external/mod_authnz_external-3.3.2.ebuild
new file mode 100644
index 000000000000..f8c3f8762ac0
--- /dev/null
+++ b/www-apache/mod_authnz_external/mod_authnz_external-3.3.2.ebuild
@@ -0,0 +1,21 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils apache-module
+
+DESCRIPTION="An Apache2 authentication DSO using external programs"
+HOMEPAGE="http://code.google.com/p/mod-auth-external/"
+SRC_URI="http://mod-auth-external.googlecode.com/files/${P}.tar.gz"
+
+LICENSE="Apache-1.1"
+SLOT="2"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+need_apache2_4
+
+DOCFILES="AUTHENTICATORS CHANGES INSTALL INSTALL.HARDCODE README TODO UPGRADE"
+
+APACHE2_MOD_CONF="10_${PN}"
+APACHE2_MOD_DEFINE="AUTHNZ_EXTERNAL"
diff --git a/www-apache/mod_authnz_persona/Manifest b/www-apache/mod_authnz_persona/Manifest
new file mode 100644
index 000000000000..c61c771714e9
--- /dev/null
+++ b/www-apache/mod_authnz_persona/Manifest
@@ -0,0 +1 @@
+DIST mod_authnz_persona-0.8.1.tar.gz 22809 SHA256 b583f54b19aefc1c8a2bbaf9ea8e2d1170d9f1ed39fa91c7b76fdab55cfb9b39 SHA512 38e0231427509f5d6a2ee22c427040347d04c243cdb4d767990bfd4918cdb8ce1da043c8762389ca78898536fa0a86b88d52360e05367169bf86a3575a484de7 WHIRLPOOL 3e66a53cacd29e4ad4e0efb3234bd62cd051b952b1b0a2acc4bca3e2ac1dec5b00adbdce6157b881025f89c06b9247860fdaf45e68fe744af00eb8b3d2931063
diff --git a/www-apache/mod_authnz_persona/files/70_mod_authnz_persona.conf b/www-apache/mod_authnz_persona/files/70_mod_authnz_persona.conf
new file mode 100644
index 000000000000..e61f7536fa9e
--- /dev/null
+++ b/www-apache/mod_authnz_persona/files/70_mod_authnz_persona.conf
@@ -0,0 +1,3 @@
+<IfDefine PERSONA_AUTHNZ>
+LoadModule authnz_persona_module modules/mod_authnz_persona.so
+</IfDefine>
diff --git a/www-apache/mod_authnz_persona/metadata.xml b/www-apache/mod_authnz_persona/metadata.xml
new file mode 100644
index 000000000000..4dd420b5e2bc
--- /dev/null
+++ b/www-apache/mod_authnz_persona/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>djc@gentoo.org</email>
+ <name>Dirkjan Ochtman</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">mozilla/mod_authnz_persona</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/www-apache/mod_authnz_persona/mod_authnz_persona-0.8.1.ebuild b/www-apache/mod_authnz_persona/mod_authnz_persona-0.8.1.ebuild
new file mode 100644
index 000000000000..fcd92f86ed0a
--- /dev/null
+++ b/www-apache/mod_authnz_persona/mod_authnz_persona-0.8.1.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit apache-module eutils
+
+DESCRIPTION="An Apache2 module for easy Persona authentication"
+HOMEPAGE="https://github.com/mozilla/mod_authnz_persona"
+SRC_URI="https://github.com/mozilla/mod_authnz_persona/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="dev-libs/yajl
+ net-misc/curl"
+RDEPEND="${DEPEND}"
+
+APACHE2_MOD_CONF="70_${PN}"
+APACHE2_MOD_DEFINE="PERSONA_AUTHNZ"
+APACHE2_MOD_FILE="${S}/build/.libs/${PN}.so"
+
+DOCFILES="README.md"
+
+need_apache2
+
+src_compile() {
+ emake APXS_PATH="${APXS}" all
+}
diff --git a/www-apache/mod_backtrace/Manifest b/www-apache/mod_backtrace/Manifest
new file mode 100644
index 000000000000..e1cf2652eead
--- /dev/null
+++ b/www-apache/mod_backtrace/Manifest
@@ -0,0 +1 @@
+DIST wku_bt-2.01.zip 933169 SHA256 3033a07b284a67e519e3b2d09a255b9cd8ce5902d3d9971d4cf182dec75c7d27 SHA512 c1bde8a26b395fc5fc66cd83c9282a8c519f34d27bef628ec502cec4245a7d446300178c9c94a5c5c0eb817bb8dd146587607760f9c9e780986d6ec53f03fb4c WHIRLPOOL dc2fa4debac883909f084562ffa0d9ab9e7f60a76bd02ee0054a0258444165f6fa63490bfefeaa03fe476ca9abc1ba93e2ad60858ba3ee4611b227b48e49bf1f
diff --git a/www-apache/mod_backtrace/files/10_mod_backtrace.conf b/www-apache/mod_backtrace/files/10_mod_backtrace.conf
new file mode 100644
index 000000000000..822efd2667fb
--- /dev/null
+++ b/www-apache/mod_backtrace/files/10_mod_backtrace.conf
@@ -0,0 +1,4 @@
+<IfDefine BACKTRACE>
+ LoadModule backtrace_module modules/mod_backtrace.so
+ EnableExceptionHook On
+</IfDefine>
diff --git a/www-apache/mod_backtrace/metadata.xml b/www-apache/mod_backtrace/metadata.xml
new file mode 100644
index 000000000000..e4ed96ad54c9
--- /dev/null
+++ b/www-apache/mod_backtrace/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer><email>maintainer-needed@gentoo.org</email></maintainer>
+<use>
+ <flag name="unwind">
+ Use <pkg>sys-libs/libunwind</pkg> to provide better resolution of
+ function names.
+ </flag>
+</use>
+</pkgmetadata>
diff --git a/www-apache/mod_backtrace/mod_backtrace-2.01.ebuild b/www-apache/mod_backtrace/mod_backtrace-2.01.ebuild
new file mode 100644
index 000000000000..6c3bf16e8b59
--- /dev/null
+++ b/www-apache/mod_backtrace/mod_backtrace-2.01.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit apache-module depend.apache
+
+DESCRIPTION="Debug segmentation faults in Apache threads"
+HOMEPAGE="http://emptyhammock.com/projects/httpd/diag/"
+SRC_URI="http://emptyhammock.com/downloads/wku_bt-${PV}.zip"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="unwind"
+
+RDEPEND="=www-servers/apache-2*[debug]
+ unwind? ( sys-libs/libunwind )"
+DEPEND="${RDEPEND}
+ app-arch/unzip"
+
+APACHE2_MOD_CONF="10_${PN}"
+APACHE2_MOD_DEFINE="BACKTRACE"
+
+need_apache2
+
+S="${WORKDIR}/wku_bt-${PV}"
+
+src_compile() {
+ APXS2_ARGS="-c ${PN}.c diag.c -ldl"
+ if use unwind; then
+ APXS2_ARGS+=" -lunwind -DDIAG_HAVE_LIBUNWIND_BACKTRACE=1"
+ fi
+ apache-module_src_compile
+}
diff --git a/www-apache/mod_bw/Manifest b/www-apache/mod_bw/Manifest
new file mode 100644
index 000000000000..810eac3de166
--- /dev/null
+++ b/www-apache/mod_bw/Manifest
@@ -0,0 +1 @@
+DIST mod_bw-0.92.tgz 23816 SHA256 658eb3f63e2181ac0b6fc3ea33f0eaf637d6ef832c7df3a0e3f3d0cd2376cd7f SHA512 caa5c0eccb12498ca59428e0ac6b06e6a6c86c1126693071b5df20f32cc5a5673197b2e53e58c9edb0f0f8efd8d1c276cfdc9962cb90b219baf1bd0785ea2443 WHIRLPOOL 639bd389f9124973b5592865c6ecbc5402f0bf28876abf55f19fe5e2e43eaf61f00c615b52b6c2b62dbbfc0195efdf2967b0ce646e27368ad983ef3fa62ce546
diff --git a/www-apache/mod_bw/files/11_mod_bw.conf b/www-apache/mod_bw/files/11_mod_bw.conf
new file mode 100644
index 000000000000..1d990612bdc5
--- /dev/null
+++ b/www-apache/mod_bw/files/11_mod_bw.conf
@@ -0,0 +1,16 @@
+<IfDefine BW>
+LoadModule bw_module modules/mod_bw.so
+
+# This must be turned on for mod_bandwidth to actually do anything
+# These directives can go inside a VirtualHost or Directory, etc...
+#BandWidthModule On
+
+# Limit 196.168.0.0/24 to 80KB/sec, with a minimum of 60KB/sec
+#BandWidth 196.168.0 80000
+#BandWidth 196.168.0 60000
+
+# Everyone else shares 50KB/sec
+#Bandwidth all 50000
+</IfDefine>
+
+# vim: ts=4 filetype=apache
diff --git a/www-apache/mod_bw/files/mod_bw-0.9.2-apache24.patch b/www-apache/mod_bw/files/mod_bw-0.9.2-apache24.patch
new file mode 100644
index 000000000000..27af0dbc1c6f
--- /dev/null
+++ b/www-apache/mod_bw/files/mod_bw-0.9.2-apache24.patch
@@ -0,0 +1,49 @@
+--- a/mod_bw.c 2010-07-20 18:14:30.000000000 +0200
++++ b/mod_bw.c 2014-03-31 14:36:27.064883758 +0200
+@@ -105,6 +105,10 @@ Changelog :
+ #define apr_atomic_set32 apr_atomic_set
+ #endif
+
++#define APACHE_VERSION_AT_LEAST(major,minor) \
++(((major) < AP_SERVER_MAJORVERSION_NUMBER) \
++ || ((major) == AP_SERVER_MAJORVERSION_NUMBER && (minor) <= AP_SERVER_MINORVERSION_NUMBER))
++
+ /* Enum types of "from address" */
+ enum from_type {
+ T_ALL,
+@@ -564,7 +568,11 @@ static long get_bw_rate(request_rec * r,
+ return e[i].rate;
+
+ case T_IP:
++#if APACHE_VERSION_AT_LEAST(2,4)
++ if (apr_ipsubnet_test(e[i].x.ip, r->useragent_addr)) {
++#else
+ if (apr_ipsubnet_test(e[i].x.ip, r->connection->remote_addr)) {
++#endif
+ return e[i].rate;
+ }
+ break;
+@@ -655,7 +663,11 @@ static int get_maxconn(request_rec * r,
+ return e[i].max;
+
+ case T_IP:
++#if APACHE_VERSION_AT_LEAST(2,4)
++ if (apr_ipsubnet_test(e[i].x.ip, r->useragent_addr)) {
++#else
+ if (apr_ipsubnet_test(e[i].x.ip, r->connection->remote_addr)) {
++#endif
+ return e[i].max;
+ }
+ break;
+@@ -706,7 +718,11 @@ static int get_sid(request_rec * r, apr_
+ return e[i].sid;
+
+ case T_IP:
++#if APACHE_VERSION_AT_LEAST(2,4)
++ if (apr_ipsubnet_test(e[i].x.ip, r->useragent_addr)) {
++#else
+ if (apr_ipsubnet_test(e[i].x.ip, r->connection->remote_addr)) {
++#endif
+ return e[i].sid;
+ }
+ break;
diff --git a/www-apache/mod_bw/metadata.xml b/www-apache/mod_bw/metadata.xml
new file mode 100644
index 000000000000..4538a68724a6
--- /dev/null
+++ b/www-apache/mod_bw/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer><email>maintainer-needed@gentoo.org</email></maintainer>
+</pkgmetadata>
diff --git a/www-apache/mod_bw/mod_bw-0.9.2-r1.ebuild b/www-apache/mod_bw/mod_bw-0.9.2-r1.ebuild
new file mode 100644
index 000000000000..e2f07a08b9bf
--- /dev/null
+++ b/www-apache/mod_bw/mod_bw-0.9.2-r1.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit apache-module eutils
+
+DESCRIPTION="Bandwidth Management Module for Apache2"
+HOMEPAGE="http://www.ivn.cl/apache/"
+
+SRC_URI="http://ivn.cl/files/source/${P/9./9}.tgz"
+
+KEYWORDS="amd64 ppc x86"
+LICENSE="Apache-2.0"
+SLOT="0"
+IUSE=""
+
+DEPEND="sys-devel/libtool"
+RDEPEND=""
+
+APACHE2_MOD_CONF="11_${PN}"
+APACHE2_MOD_DEFINE="BW"
+
+need_apache2
+
+S="${WORKDIR}"
+
+src_prepare() {
+ epatch "${FILESDIR}/${P}-apache24.patch"
+}
diff --git a/www-apache/mod_caucho/Manifest b/www-apache/mod_caucho/Manifest
new file mode 100644
index 000000000000..cb7fcad096c2
--- /dev/null
+++ b/www-apache/mod_caucho/Manifest
@@ -0,0 +1,2 @@
+DIST resin-4.0.26-src.zip 17879008 SHA256 0f7bbea8bd4803d499e1d212a49ac8672500ede80194c4daa12c980ad405e34e SHA512 aae0304664c67667b9abf304ccc3dbaf073be42fcd1dd6aa380d841a34a2a44f0187fa91abe6bf92bf66f394b4b2d4eda7c4c9a55b5cb8a76436446cca3d5512 WHIRLPOOL a536b28cad14219ce5c8aaa791a859d21539176b6f729072483e6278fa9b45de2bb367d6696225c1bafe0148c86c3bb0e46ec81595222160aa742ffdf9d5674c
+DIST resin-gentoo-patches-4.0.26.tar.bz2 3826 SHA256 adff1fb68e38af68add2e16e3832406a105e14532ee022ad315a955d6d6f4f31 SHA512 fc23c6b82f55b76c063276169e8b6be40ab697dfa07ab8f8f560db33b9c48993526f07190b137406f952e0d1a548cc45f30b6a9ceb4983e2a9eed5de8f4ab5d3 WHIRLPOOL cf7403adcdd0b98fcab2ace7733af7e9fa57361f9e2b2fb128ee8c3a9d787c5e8437f6749889cea1aacbf1ec9b9725647e6737fe4e3d1a98d69d1965c129c2d2
diff --git a/www-apache/mod_caucho/files/88_mod_caucho.conf b/www-apache/mod_caucho/files/88_mod_caucho.conf
new file mode 100644
index 000000000000..20e0e7081136
--- /dev/null
+++ b/www-apache/mod_caucho/files/88_mod_caucho.conf
@@ -0,0 +1,21 @@
+<IfDefine CAUCHO>
+# Load module:
+LoadModule caucho_module modules/mod_caucho.so
+
+# Define first Resin server:
+ResinConfigServer localhost 6802
+
+# If you want to use load balancing add more hosts:
+# ResinConfigServer host1.example.com 6802
+# ResinConfigServer host2.example.com 6802
+
+# This enables status page of server: http://localhost/caucho-status
+CauchoStatus yes
+
+# To use this module:
+#<Location /webapp/*>
+# SetHandler caucho-request
+#</Location>
+</IfDefine>
+
+# vim: ts=4 filetype=apache
diff --git a/www-apache/mod_caucho/metadata.xml b/www-apache/mod_caucho/metadata.xml
new file mode 100644
index 000000000000..7303cef96964
--- /dev/null
+++ b/www-apache/mod_caucho/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>java</herd>
+</pkgmetadata>
diff --git a/www-apache/mod_caucho/mod_caucho-4.0.26-r1.ebuild b/www-apache/mod_caucho/mod_caucho-4.0.26-r1.ebuild
new file mode 100644
index 000000000000..784fa2ceff88
--- /dev/null
+++ b/www-apache/mod_caucho/mod_caucho-4.0.26-r1.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils apache-module autotools
+
+DESCRIPTION="mod_caucho connects Resin and Apache2"
+HOMEPAGE="http://www.caucho.com/"
+SRC_URI="http://www.caucho.com/download/resin-${PV}-src.zip
+ mirror://gentoo/resin-gentoo-patches-${PV}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
+IUSE=""
+
+DEPEND="app-arch/unzip
+ ~virtual/jre-1.6.0"
+RDEPEND="~virtual/jre-1.6.0"
+
+S="${WORKDIR}/resin-${PV}"
+
+# See apache-module.eclass for more information.
+APACHE2_MOD_CONF="88_${PN}"
+APACHE2_MOD_DEFINE="CAUCHO"
+APACHE2_MOD_FILE="${S}/modules/c/src/apache2/.libs/${PN}.so"
+
+need_apache2_4
+
+src_prepare() {
+ # Apache 2.4
+ sed -i \
+ -e 's/remote_ip/client_ip/g' \
+ -e 's/remote_addr/client_addr/g' \
+ modules/c/src/apache2/mod_caucho.c || die
+
+ for i in "${WORKDIR}"/${PV}/mod_caucho-*; do
+ epatch "${i}"
+ done
+
+ mkdir m4
+ eautoreconf
+ chmod 755 ./configure
+}
+
+src_configure() {
+ econf --with-apxs=${APXS} --with-java-home=/usr
+}
+
+src_compile() {
+ emake -C "${S}/modules/c/src/apache2/"
+}
diff --git a/www-apache/mod_caucho/mod_caucho-4.0.26.ebuild b/www-apache/mod_caucho/mod_caucho-4.0.26.ebuild
new file mode 100644
index 000000000000..f207a4afbe20
--- /dev/null
+++ b/www-apache/mod_caucho/mod_caucho-4.0.26.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+
+inherit eutils apache-module autotools
+
+DESCRIPTION="mod_caucho connects Resin and Apache2"
+HOMEPAGE="http://www.caucho.com/"
+SRC_URI="http://www.caucho.com/download/resin-${PV}-src.zip
+ mirror://gentoo/resin-gentoo-patches-${PV}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~ppc ~ppc64 x86"
+IUSE=""
+
+DEPEND="app-arch/unzip
+ ~virtual/jre-1.6.0"
+RDEPEND="~virtual/jre-1.6.0"
+
+S="${WORKDIR}/resin-${PV}"
+
+# See apache-module.eclass for more information.
+APACHE2_MOD_CONF="88_${PN}"
+APACHE2_MOD_DEFINE="CAUCHO"
+APACHE2_MOD_FILE="${S}/modules/c/src/apache2/.libs/${PN}.so"
+
+need_apache2_2
+
+src_prepare() {
+ for i in "${WORKDIR}"/${PV}/mod_caucho-*; do
+ epatch "${i}"
+ done
+
+ mkdir m4
+ eautoreconf
+ chmod 755 ./configure
+}
+
+src_configure() {
+ econf --with-apxs=${APXS} --with-java-home=/usr || die "econf failed"
+}
+
+src_compile() {
+ emake -C "${S}/modules/c/src/apache2/" || die "emake failed"
+}
diff --git a/www-apache/mod_cband/Manifest b/www-apache/mod_cband/Manifest
new file mode 100644
index 000000000000..3f96e5e5ec52
--- /dev/null
+++ b/www-apache/mod_cband/Manifest
@@ -0,0 +1 @@
+DIST mod-cband-0.9.7.5.tgz 70713 SHA256 6fd9024354153cc52538c81986afc18c1ff9395523bbe096f1810903fa7528ab SHA512 71b6b9946c24a7f424746c8f9add721ed1a14681b97a3d41115fbc228b83dba7068089f48d8acc41b108117f4abe3f0b55a77af0faefd0c84975e7003607714a WHIRLPOOL 4494e07f0b27f34932df45f2790335548af34c77caae5074e626f45c29feb0d1214deb9b34dfea62c756f9e6d92dd88211216beb673af3e1cd17c42f1e06e10b
diff --git a/www-apache/mod_cband/files/10_mod_cband.conf b/www-apache/mod_cband/files/10_mod_cband.conf
new file mode 100644
index 000000000000..7f038889c62f
--- /dev/null
+++ b/www-apache/mod_cband/files/10_mod_cband.conf
@@ -0,0 +1,37 @@
+# This file only loads mod_cband and enables /cband-status page.
+# For examples please consult the vhosts.conf.example.gz,
+# vhosts2.conf.example.gz and vhosts3.conf.example.gz files installed in
+# /usr/share/doc/mod_cband-*/
+
+<IfDefine CBAND>
+LoadModule cband_module modules/mod_cband.so
+
+<Location /cband-status>
+ SetHandler cband-status
+</Location>
+
+# Some defaults:
+#CBandDefaultExceededURL http://www.google.com
+#CBandScoreFlushPeriod 100
+
+# And in virtual host configuration to limit it's speed:
+#<VirtualHost *:80>
+# DocumentRoot /var/www/example.com/htdocs
+# ServerName www.example.com
+# <IfModule mod_cband.c>
+# CBandLimit 600M
+# CBandExceededURL http://www.example.com/ex1.html
+# CBandScoreboard /var/run/mod_cband.example.com.scoreboard
+# CBandPeriod 200S
+#
+# # 100kb/s, 10 request/s, max 5 connections
+# CBandSpeed 100kb 10 5
+#
+# # 10kb/s, 3 request/s -> speed limit for any remote client, max 5 connections
+# CBandRemoteSpeed 10kb/s 3 5
+# </IfModule>
+#</VirtualHost>
+
+</IfDefine>
+
+# vim: ts=4 filetype=apache
diff --git a/www-apache/mod_cband/metadata.xml b/www-apache/mod_cband/metadata.xml
new file mode 100644
index 000000000000..aba833ed90e0
--- /dev/null
+++ b/www-apache/mod_cband/metadata.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>maintainer-needed@gentoo.org</email>
+ </maintainer>
+</pkgmetadata>
diff --git a/www-apache/mod_cband/mod_cband-0.9.7.5.ebuild b/www-apache/mod_cband/mod_cband-0.9.7.5.ebuild
new file mode 100644
index 000000000000..357254d05413
--- /dev/null
+++ b/www-apache/mod_cband/mod_cband-0.9.7.5.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit apache-module
+
+KEYWORDS="amd64 x86"
+
+DESCRIPTION="Apache2 bandwidth quota and throttling module"
+HOMEPAGE="http://codee.pl/cband.html"
+SRC_URI="http://cband.linux.pl/download/mod-cband-${PV}.tgz"
+LICENSE="GPL-2"
+SLOT="0"
+IUSE=""
+
+DEPEND=""
+RDEPEND=""
+
+S="${WORKDIR}/mod-cband-${PV}"
+
+DOCFILES="conf/vhosts3.conf.example \
+ conf/vhosts2.conf.example \
+ conf/vhosts.conf.example \
+ Changes AUTHORS doc/*"
+
+APACHE2_MOD_CONF="10_${PN}"
+APACHE2_MOD_DEFINE="CBAND"
+
+APXS2_ARGS="-DDST_CLASS=3 -c ${PN}.c"
+
+need_apache2_2
diff --git a/www-apache/mod_common_redirect/Manifest b/www-apache/mod_common_redirect/Manifest
new file mode 100644
index 000000000000..41c4a0d218f6
--- /dev/null
+++ b/www-apache/mod_common_redirect/Manifest
@@ -0,0 +1 @@
+DIST mod_common_redirect-0.1.1.tar.gz 3341 SHA256 d51b48c5fd140b051055339c79719597e194f38d1cee7149ee98669772d97c23
diff --git a/www-apache/mod_common_redirect/files/20_mod_common_redirect.conf b/www-apache/mod_common_redirect/files/20_mod_common_redirect.conf
new file mode 100644
index 000000000000..f2d135e66ecd
--- /dev/null
+++ b/www-apache/mod_common_redirect/files/20_mod_common_redirect.conf
@@ -0,0 +1,5 @@
+<IfDefine COMMON_REDIRECT>
+LoadModule common_redirect_module modules/mod_common_redirect.so
+</IfDefine>
+
+# vim: ts=4 filetype=apache
diff --git a/www-apache/mod_common_redirect/metadata.xml b/www-apache/mod_common_redirect/metadata.xml
new file mode 100644
index 000000000000..7966e6e344bd
--- /dev/null
+++ b/www-apache/mod_common_redirect/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>maintainer-needed@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">hollow/mod_common_redirect</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/www-apache/mod_common_redirect/mod_common_redirect-0.1.1.ebuild b/www-apache/mod_common_redirect/mod_common_redirect-0.1.1.ebuild
new file mode 100644
index 000000000000..0a52f4a0bae6
--- /dev/null
+++ b/www-apache/mod_common_redirect/mod_common_redirect-0.1.1.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit apache-module
+
+GITHUB_AUTHOR="hollow"
+GITHUB_PROJECT="mod_common_redirect"
+GITHUB_COMMIT="595a370"
+
+DESCRIPTION="mod_common_redirect implements common redirects without mod_rewrite overhead"
+HOMEPAGE="http://github.com/hollow/mod_common_redirect"
+SRC_URI="http://nodeload.github.com/${GITHUB_AUTHOR}/${GITHUB_PROJECT}/tarball/v${PV} -> ${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND=""
+
+APACHE2_MOD_CONF="20_${PN}"
+APACHE2_MOD_DEFINE="COMMON_REDIRECT"
+
+need_apache2
+
+S="${WORKDIR}"/${GITHUB_AUTHOR}-${GITHUB_PROJECT}-${GITHUB_COMMIT}
diff --git a/www-apache/mod_depends/Manifest b/www-apache/mod_depends/Manifest
new file mode 100644
index 000000000000..6d6820131da5
--- /dev/null
+++ b/www-apache/mod_depends/Manifest
@@ -0,0 +1 @@
+DIST mod_depends-0.7.0_p200702041.tar.bz2 232205 SHA256 726c3a6f188ce8cd6e55241bef16146824694c4ed24bbb0b469df03f2c5f32a4
diff --git a/www-apache/mod_depends/files/0.7/09_mod_depends.conf b/www-apache/mod_depends/files/0.7/09_mod_depends.conf
new file mode 100644
index 000000000000..ff2226e74077
--- /dev/null
+++ b/www-apache/mod_depends/files/0.7/09_mod_depends.conf
@@ -0,0 +1,5 @@
+<IfDefine DEPENDS>
+LoadModule depends_module modules/mod_depends.so
+</IfDefine>
+
+# vim: ts=4 filetype=apache
diff --git a/www-apache/mod_depends/metadata.xml b/www-apache/mod_depends/metadata.xml
new file mode 100644
index 000000000000..4538a68724a6
--- /dev/null
+++ b/www-apache/mod_depends/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer><email>maintainer-needed@gentoo.org</email></maintainer>
+</pkgmetadata>
diff --git a/www-apache/mod_depends/mod_depends-0.7.0_p200702041.ebuild b/www-apache/mod_depends/mod_depends-0.7.0_p200702041.ebuild
new file mode 100644
index 000000000000..c1136c44cc14
--- /dev/null
+++ b/www-apache/mod_depends/mod_depends-0.7.0_p200702041.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils apache-module
+
+DESCRIPTION="An apache helper module for handling dependencies properly"
+SRC_URI="http://upstream.rm-rf.in/${PN}/${P}.tar.bz2"
+HOMEPAGE="http://www.outoforder.cc/projects/apache/mod_depends/"
+
+SLOT="0"
+LICENSE="Apache-2.0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE=""
+
+APACHE2_MOD_CONF="0.7/09_${PN}"
+APACHE2_MOD_DEFINE="DEPENDS"
+
+need_apache2
+
+src_compile() {
+ econf --with-apxs="${APXS}" || die "configure failed"
+ emake || die "make failed"
+}
+
+src_install() {
+ AP_INCLUDEDIR=$(${APXS} -q INCLUDEDIR)
+
+ insinto ${AP_INCLUDEDIR}
+ doins include/mod_depends.h || die
+
+ mv -v src/.libs/{lib,}mod_depends.so
+
+ apache-module_src_install
+}
+
+# vim:ts=4
diff --git a/www-apache/mod_diagnostics/Manifest b/www-apache/mod_diagnostics/Manifest
new file mode 100644
index 000000000000..56d7ebc4f213
--- /dev/null
+++ b/www-apache/mod_diagnostics/Manifest
@@ -0,0 +1 @@
+DIST mod_diagnostics-0.0.1.c 6373 SHA256 838947b5019dfb865dc2fcaca5acaeff123bde6f83dc2dd9064fb1153cd1ea14
diff --git a/www-apache/mod_diagnostics/files/20_mod_diagnostics.conf b/www-apache/mod_diagnostics/files/20_mod_diagnostics.conf
new file mode 100644
index 000000000000..7600654ea7f1
--- /dev/null
+++ b/www-apache/mod_diagnostics/files/20_mod_diagnostics.conf
@@ -0,0 +1,5 @@
+<IfDefine DIAGNOSTICS>
+LoadModule diagnostic_filter_module modules/mod_diagnostics.so
+</IfDefine>
+
+# vim: ts=4 filetype=apache
diff --git a/www-apache/mod_diagnostics/metadata.xml b/www-apache/mod_diagnostics/metadata.xml
new file mode 100644
index 000000000000..4538a68724a6
--- /dev/null
+++ b/www-apache/mod_diagnostics/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer><email>maintainer-needed@gentoo.org</email></maintainer>
+</pkgmetadata>
diff --git a/www-apache/mod_diagnostics/mod_diagnostics-0.0.1.ebuild b/www-apache/mod_diagnostics/mod_diagnostics-0.0.1.ebuild
new file mode 100644
index 000000000000..43890ee90d90
--- /dev/null
+++ b/www-apache/mod_diagnostics/mod_diagnostics-0.0.1.ebuild
@@ -0,0 +1,27 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit apache-module
+
+KEYWORDS="x86"
+
+DESCRIPTION="An Apache2 module which can do debugging of modules in the Apache2 Filter Chain"
+HOMEPAGE="http://apache.webthing.com/mod_diagnostics/"
+SRC_URI="mirror://gentoo/${P}.c"
+LICENSE="GPL-2"
+SLOT="0"
+IUSE=""
+
+DEPEND=""
+RDEPEND=""
+
+APACHE2_MOD_CONF="20_${PN}"
+APACHE2_MOD_DEFINE="DIAGNOSTICS"
+
+need_apache2
+
+src_unpack() {
+ mkdir -p "${S}" || die "mkdir S failed"
+ cp -f "${DISTDIR}/${P}.c" "${S}/${PN}.c" || die "source copy failed"
+}
diff --git a/www-apache/mod_dnsbl_lookup/Manifest b/www-apache/mod_dnsbl_lookup/Manifest
new file mode 100644
index 000000000000..3d98047d7884
--- /dev/null
+++ b/www-apache/mod_dnsbl_lookup/Manifest
@@ -0,0 +1 @@
+DIST mod_dnsbl_lookup-0.91.tar.gz 7344 SHA256 62a2c881c96453bdbf79aa6e3033044074a99ddf749fea734c955e73b26b3d69
diff --git a/www-apache/mod_dnsbl_lookup/files/09_mod_dnsbl_lookup.conf b/www-apache/mod_dnsbl_lookup/files/09_mod_dnsbl_lookup.conf
new file mode 100644
index 000000000000..ae944d34c1a4
--- /dev/null
+++ b/www-apache/mod_dnsbl_lookup/files/09_mod_dnsbl_lookup.conf
@@ -0,0 +1,7 @@
+<IfDefine DNSBL>
+LoadModule dnsbl_lookup_module modules/mod_dnsbl_lookup.so
+DNSBLZone spammers dnsbl.ahbl.org any
+DNSBLZone spammers sbl.spamhaus.org any
+</IfDefine>
+
+# vim: ts=4 filetype=apache
diff --git a/www-apache/mod_dnsbl_lookup/metadata.xml b/www-apache/mod_dnsbl_lookup/metadata.xml
new file mode 100644
index 000000000000..4538a68724a6
--- /dev/null
+++ b/www-apache/mod_dnsbl_lookup/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer><email>maintainer-needed@gentoo.org</email></maintainer>
+</pkgmetadata>
diff --git a/www-apache/mod_dnsbl_lookup/mod_dnsbl_lookup-0.91.ebuild b/www-apache/mod_dnsbl_lookup/mod_dnsbl_lookup-0.91.ebuild
new file mode 100644
index 000000000000..36e481326688
--- /dev/null
+++ b/www-apache/mod_dnsbl_lookup/mod_dnsbl_lookup-0.91.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit apache-module eutils
+
+KEYWORDS="~amd64 ~x86"
+
+DESCRIPTION="A helper module for Apache2 providing DNSBL lookup"
+HOMEPAGE="http://www.sysdesign.ca"
+SRC_URI="http://www.sysdesign.ca/archive/${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+IUSE=""
+
+DEPEND=""
+RDEPEND=""
+
+APACHE2_MOD_CONF="09_${PN}"
+APACHE2_MOD_DEFINE="DNSBL"
+
+need_apache2
+
+src_install() {
+ apache-module_src_install
+ insinto $(${APXS} -q INCLUDEDIR)
+ doins dnsbl_lookup.h
+}
diff --git a/www-apache/mod_dnssd/Manifest b/www-apache/mod_dnssd/Manifest
new file mode 100644
index 000000000000..a91b572666e9
--- /dev/null
+++ b/www-apache/mod_dnssd/Manifest
@@ -0,0 +1 @@
+DIST mod_dnssd-0.6.tar.gz 86417 SHA256 2cd171d76eba398f03c1d5bcc468a1756f4801cd8ed5bd065086e4374997c5aa SHA512 c3eacd2065f996ace76496b828a5be4b735225782c88ed0fba00c37ffed91af7c81cef755556968880e11e05fbaf65a4326728cb82abcad03ccaf925be1f29d3 WHIRLPOOL aa27272b8e35fcc492e7265171ce720f9cefc157fdb9f4997474f669e97d168ce851f6351c8857dd8bf01d3e0ea2c87085de1aa2ddb114317d0649b84a2717ba
diff --git a/www-apache/mod_dnssd/files/80_mod_dnssd.conf b/www-apache/mod_dnssd/files/80_mod_dnssd.conf
new file mode 100644
index 000000000000..1c67f7e86efc
--- /dev/null
+++ b/www-apache/mod_dnssd/files/80_mod_dnssd.conf
@@ -0,0 +1,6 @@
+<IfDefine DNSSD>
+LoadModule dnssd_module modules/mod_dnssd.so
+DNSSDEnable on
+</IfDefine>
+
+# vim: ts=4 filetype=apache
diff --git a/www-apache/mod_dnssd/files/mod_dnssd-0.6-httpd24.patch b/www-apache/mod_dnssd/files/mod_dnssd-0.6-httpd24.patch
new file mode 100644
index 000000000000..6eb505810405
--- /dev/null
+++ b/www-apache/mod_dnssd/files/mod_dnssd-0.6-httpd24.patch
@@ -0,0 +1,24 @@
+--- mod_dnssd-0.6/src/mod_dnssd.c.httpd24
++++ mod_dnssd-0.6/src/mod_dnssd.c
+@@ -26,6 +26,9 @@
+ #include <unixd.h>
+ #include <apr_signal.h>
+ #include <mpm_common.h>
++#if AP_MODULE_MAGIC_AT_LEAST(20090130,0)
++#include <mod_unixd.h>
++#endif
+
+ #include <unistd.h>
+
+@@ -576,7 +579,11 @@ static void child_process(apr_pool_t *p,
+
+ ap_assert(d);
+
++#if AP_MODULE_MAGIC_AT_LEAST(20090130,0)
++ ap_unixd_setup_child();
++#else
+ unixd_setup_child();
++#endif
+
+ if (pipe(sigterm_pipe_fds) < 0) {
+ ap_log_error(APLOG_MARK, APLOG_ERR, 0, r.main_server, "pipe() failed: %s", strerror(errno));
diff --git a/www-apache/mod_dnssd/files/mod_dnssd-0.6-ldflags.patch b/www-apache/mod_dnssd/files/mod_dnssd-0.6-ldflags.patch
new file mode 100644
index 000000000000..699f2301f442
--- /dev/null
+++ b/www-apache/mod_dnssd/files/mod_dnssd-0.6-ldflags.patch
@@ -0,0 +1,22 @@
+---
+ Respect LDFLAGS and properly use LIBS to avoid missing symbols at runtime.
+
+--- src/Makefile.in
++++ src/Makefile.in
+@@ -16,13 +16,14 @@
+
+ APXS=@APXS@
+ APACHECTL=@APACHECTL@
+-LIBS=-Wl,"@LIBS@" @AVAHI_LIBS@
++LIBS="@LIBS@" @AVAHI_LIBS@
+ CFLAGS=-Wc,"@CFLAGS@" @AVAHI_CFLAGS@
++APXS_LDFLAGS=`for ldflag in $(LDFLAGS); do echo -Wl,$$ldflag; done`
+
+ all: mod_dnssd.la
+
+ mod_dnssd.la: @srcdir@/mod_dnssd.c
+- $(APXS) -c $(CFLAGS) $(LIBS) @srcdir@/mod_dnssd.c
++ $(APXS) -c $(CFLAGS) $(APXS_LDFLAGS) @srcdir@/mod_dnssd.c $(LIBS)
+
+ install: all
+ $(APXS) -i -a mod_dnssd.la
diff --git a/www-apache/mod_dnssd/metadata.xml b/www-apache/mod_dnssd/metadata.xml
new file mode 100644
index 000000000000..4538a68724a6
--- /dev/null
+++ b/www-apache/mod_dnssd/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer><email>maintainer-needed@gentoo.org</email></maintainer>
+</pkgmetadata>
diff --git a/www-apache/mod_dnssd/mod_dnssd-0.6-r1.ebuild b/www-apache/mod_dnssd/mod_dnssd-0.6-r1.ebuild
new file mode 100644
index 000000000000..9caa769e8055
--- /dev/null
+++ b/www-apache/mod_dnssd/mod_dnssd-0.6-r1.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit apache-module eutils
+
+DESCRIPTION="mod_dnssd is an Apache module which adds Zeroconf support via DNS-SD using Avahi"
+HOMEPAGE="http://0pointer.de/lennart/projects/mod_dnssd/"
+SRC_URI="http://0pointer.de/lennart/projects/${PN}/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 ~arm x86"
+IUSE=""
+
+DEPEND="net-dns/avahi[dbus]"
+RDEPEND="${DEPEND}"
+
+APACHE2_MOD_CONF="80_${PN}"
+APACHE2_MOD_DEFINE="DNSSD"
+
+need_apache2
+
+src_prepare() {
+ # Respect LDFLAGS and use LIBS properly.
+ epatch "${FILESDIR}/${P}-ldflags.patch"
+
+ # Fedora patch for apache 2.4
+ epatch "${FILESDIR}/${P}-httpd24.patch"
+}
+
+src_configure() {
+ econf --with-apxs=${APXS} --disable-lynx
+}
+
+# Do not use inherited src_compile since it doesn't do what we want
+src_compile() {
+ emake
+}
diff --git a/www-apache/mod_evasive/Manifest b/www-apache/mod_evasive/Manifest
new file mode 100644
index 000000000000..36a8f676e7e1
--- /dev/null
+++ b/www-apache/mod_evasive/Manifest
@@ -0,0 +1 @@
+DIST mod_evasive_1.10.1.tar.gz 20454 SHA256 07c45139aa313899484a900f0fc162b3e17eb4f60fe474d7f3dd6c9941e95667 SHA512 03b276d1a3dc8e853ca7f3791d66383492a7ae8f3b73988f0eefa7e4e31f267da432e811de81c8d721033e152e94139efc99ad80da809f220a1330e9d43d39ba WHIRLPOOL d461998009eba9c961388b29e504e33d151f7720b84c7151b1b69e25428e55ef8eb1b42edf3bbbc1dcc9b1432760efb80bf45bf1060361d95e4b983e381a17a7
diff --git a/www-apache/mod_evasive/files/10_mod_evasive.conf b/www-apache/mod_evasive/files/10_mod_evasive.conf
new file mode 100644
index 000000000000..31ea08c7bf09
--- /dev/null
+++ b/www-apache/mod_evasive/files/10_mod_evasive.conf
@@ -0,0 +1,31 @@
+<IfDefine EVASIVE>
+LoadModule evasive_module modules/mod_evasive.so
+
+DOSHashTableSize 3097
+DOSPageCount 5
+DOSSiteCount 100
+DOSPageInterval 2
+DOSSiteInterval 2
+DOSBlockingPeriod 10
+
+# Set here an email to notify the DoS to someone
+# (here is better to set the server administrator email)
+DOSEmailNotify root
+
+# Uncomment this line if you want to execute a specific command
+# after the DoS detection
+#DOSSystemCommand "su - someuser -c '/sbin/... %s ...'"
+
+# Specify the desired mod_evasive log location
+DOSLogDir /var/log/apache2/evasive
+
+# WHITELISTING IP ADDRESSES
+# IP addresses of trusted clients can be whitelisted to insure they are never
+# denied. The purpose of whitelisting is to protect software, scripts, local
+# searchbots, or other automated tools from being denied for requesting large
+# amounts of data from the server.
+#DOSWhitelist 127.0.0.*
+#DOSWhitelist 172.16.1.*
+</IfDefine>
+
+# vim: ts=4 filetype=apache
diff --git a/www-apache/mod_evasive/metadata.xml b/www-apache/mod_evasive/metadata.xml
new file mode 100644
index 000000000000..4538a68724a6
--- /dev/null
+++ b/www-apache/mod_evasive/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer><email>maintainer-needed@gentoo.org</email></maintainer>
+</pkgmetadata>
diff --git a/www-apache/mod_evasive/mod_evasive-1.10.1-r1.ebuild b/www-apache/mod_evasive/mod_evasive-1.10.1-r1.ebuild
new file mode 100644
index 000000000000..291b67eca674
--- /dev/null
+++ b/www-apache/mod_evasive/mod_evasive-1.10.1-r1.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit apache-module eutils
+
+KEYWORDS="~amd64 ~x86"
+
+DESCRIPTION="mod_evasive is an evasive maneuvers module to provide action in the event of an HTTP DoS"
+HOMEPAGE="http://www.zdziarski.com/blog/?page_id=442"
+SRC_URI="http://www.zdziarski.com/projects/mod_evasive/${P/-/_}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+IUSE=""
+
+DEPEND=""
+RDEPEND=""
+
+APACHE2_MOD_CONF="10_${PN}"
+APACHE2_MOD_DEFINE="EVASIVE"
+
+need_apache2_4
+
+S="${WORKDIR}"/${PN}
+
+src_prepare() {
+ # Apache 2.4
+ sed -i -e 's/connection->remote_ip/connection->client_ip/' mod_evasive20.c || die
+ mv ${PN}20.c ${PN}.c
+ sed -i -e 's:evasive20_module:evasive_module:g' ${PN}.c || die
+}
+
+src_install() {
+ keepdir /var/log/apache2/evasive
+ apache-module_src_install
+}
diff --git a/www-apache/mod_extract_forwarded/Manifest b/www-apache/mod_extract_forwarded/Manifest
new file mode 100644
index 000000000000..b0298f45cb15
--- /dev/null
+++ b/www-apache/mod_extract_forwarded/Manifest
@@ -0,0 +1,2 @@
+DIST extract_forwarded-2.0.2.tar.gz 13812 SHA256 934e2da02a2a71dd40a6050e884ac034174a1bfee0d0d4aeeeb68b942d94cafb SHA512 20b408cc27bd0d92333a90a41c7e93362919693dbeb7643388bb0c70cb0aab88cbd6361d7f5bc3f892da715bcb1d7241a2cc396b5feb6f31f8716f08c83242ca WHIRLPOOL 1ae1d700f92a9e120764c2664029cf8e1d87c1655d2da5913b58c41f185b7da3d365b106af398c33e71197a60c47c06be291e9b54fc8e5ac0c6be33ae3a83ab4
+DIST mod_extract_forwarded-2.0.3_pre2015052015.tar.xz 13548 SHA256 284861a3267b8b494408a692cf6b4c7f31957e18b25ba7f6b1a6e0cd3bcd1bd9 SHA512 26cfde6343885eea964dcd96ce9bc5952bfb9b5b27b093abd71358a26548c1361e37449d2f38a68aa0bac0bc43e465d65d6fbfaf91598b94ced2e65b861a14db WHIRLPOOL 2a68b21233616fc77d9faa812dffd51c7629f49059c53cc42c4c9b585a738c2579899105c0eed15fac288232698045e8f0009a576173bf3878f80ae3ea6d807b
diff --git a/www-apache/mod_extract_forwarded/files/98_mod_extract_forwarded.conf b/www-apache/mod_extract_forwarded/files/98_mod_extract_forwarded.conf
new file mode 100644
index 000000000000..18f7e866dbb3
--- /dev/null
+++ b/www-apache/mod_extract_forwarded/files/98_mod_extract_forwarded.conf
@@ -0,0 +1,9 @@
+<IfDefine EXTRACT_FORWARDED>
+LoadModule extract_forwarded_module modules/mod_extract_forwarded.so
+
+MEForder refuse,accept
+MEFrefuse all
+MEFaccept localhost
+</IfDefine>
+
+# vim: ts=4 filetype=apache
diff --git a/www-apache/mod_extract_forwarded/metadata.xml b/www-apache/mod_extract_forwarded/metadata.xml
new file mode 100644
index 000000000000..f900469bd205
--- /dev/null
+++ b/www-apache/mod_extract_forwarded/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer><email>maintainer-needed@gentoo.org</email></maintainer>
+ <use>
+ <flag name="mod_proxy">Enable support for Apache's internal proxy</flag>
+ </use>
+</pkgmetadata>
diff --git a/www-apache/mod_extract_forwarded/mod_extract_forwarded-2.0.2.ebuild b/www-apache/mod_extract_forwarded/mod_extract_forwarded-2.0.2.ebuild
new file mode 100644
index 000000000000..09a77b1fbbed
--- /dev/null
+++ b/www-apache/mod_extract_forwarded/mod_extract_forwarded-2.0.2.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="3"
+
+inherit apache-module
+
+DESCRIPTION="Apache module that rewrites X-Forwarded-For to REMOTE_ADDR for reverse proxy configurations"
+HOMEPAGE="http://www.openinfo.co.uk/apache/index.html"
+SRC_URI="http://www.openinfo.co.uk/apache/extract_forwarded-${PV}.tar.gz"
+
+LICENSE="Apache-1.1"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="mod_proxy"
+
+DEPEND=""
+RDEPEND="mod_proxy? ( www-servers/apache[apache2_modules_proxy_connect] )"
+
+S="${WORKDIR}/extract_forwarded"
+
+APACHE2_MOD_CONF="98_${PN}"
+APACHE2_MOD_DEFINE="EXTRACT_FORWARDED"
+
+need_apache2_2
+
+src_prepare() {
+ if ! use mod_proxy; then
+ sed -i -e 's:#define USING_proxy_http_module .*::' mod_extract_forwarded.c || die
+ fi
+}
diff --git a/www-apache/mod_extract_forwarded/mod_extract_forwarded-2.0.3_pre2015052015.ebuild b/www-apache/mod_extract_forwarded/mod_extract_forwarded-2.0.3_pre2015052015.ebuild
new file mode 100644
index 000000000000..6ffb8e913ae3
--- /dev/null
+++ b/www-apache/mod_extract_forwarded/mod_extract_forwarded-2.0.3_pre2015052015.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit apache-module
+
+DESCRIPTION="Apache module that rewrites X-Forwarded-For to REMOTE_ADDR for reverse proxy configurations"
+HOMEPAGE="http://www.openinfo.co.uk/apache/index.html"
+#SRC_URI="http://www.openinfo.co.uk/apache/extract_forwarded-${PV}.tar.gz"
+SRC_URI="http://dev.gentoo.org/~pacho/maintainer-needed/${P}.tar.xz"
+
+LICENSE="Apache-1.1"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="mod_proxy"
+
+DEPEND=""
+RDEPEND="mod_proxy? ( www-servers/apache[apache2_modules_proxy_connect] )"
+
+APACHE2_MOD_CONF="98_${PN}"
+APACHE2_MOD_DEFINE="EXTRACT_FORWARDED"
+
+need_apache2_4
+
+src_prepare() {
+ if ! use mod_proxy; then
+ sed -i -e 's:#define USING_proxy_http_module .*::' mod_extract_forwarded.c || die
+ fi
+}
diff --git a/www-apache/mod_fastcgi/Manifest b/www-apache/mod_fastcgi/Manifest
new file mode 100644
index 000000000000..27d71ff29c38
--- /dev/null
+++ b/www-apache/mod_fastcgi/Manifest
@@ -0,0 +1 @@
+DIST mod_fastcgi-SNAP-0910052141.tar.gz 103255 SHA256 e6564ae206284806c781834e9e89aa4b0a4dd647b45c6da5cc389c65a984bdc7 SHA512 4ab909bb26104542d44490a30f2a77f71c7f4345902f00e06424f03bbf81858a72a713580ee6081088e6d5154f702a155d25b675111371c087c122ef6d181d95 WHIRLPOOL d576eda007ce0ae598501877abbe34e407d2335d3feedd096b930a8cd7da65107efb906bd5fa75cafc30d9c2bb7bbe7a09bfaa27d40d6812b4db02514276dfd0
diff --git a/www-apache/mod_fastcgi/files/20_mod_fastcgi.conf b/www-apache/mod_fastcgi/files/20_mod_fastcgi.conf
new file mode 100644
index 000000000000..583524b568ae
--- /dev/null
+++ b/www-apache/mod_fastcgi/files/20_mod_fastcgi.conf
@@ -0,0 +1,6 @@
+<IfDefine FASTCGI>
+LoadModule fastcgi_module modules/mod_fastcgi.so
+AddHandler fastcgi-script fcg fcgi fpl
+</IfDefine>
+
+# vim: ts=4 filetype=apache
diff --git a/www-apache/mod_fastcgi/files/mod_fastcgi-compile-against-apache2.4.patch b/www-apache/mod_fastcgi/files/mod_fastcgi-compile-against-apache2.4.patch
new file mode 100644
index 000000000000..417c03ef83b1
--- /dev/null
+++ b/www-apache/mod_fastcgi/files/mod_fastcgi-compile-against-apache2.4.patch
@@ -0,0 +1,137 @@
+Index: libapache-mod-fastcgi/fcgi.h
+===================================================================
+--- libapache-mod-fastcgi.orig/fcgi.h 2012-03-07 14:29:04.005720240 +0100
++++ libapache-mod-fastcgi/fcgi.h 2012-03-07 14:29:07.830566657 +0100
+@@ -34,6 +34,10 @@
+ #define APACHE2
+ #endif
+
++#ifdef AP_DECLARE_MODULE
++#define APACHE24
++#endif
++
+ #ifdef APACHE2
+
+ #include <sys/stat.h>
+@@ -57,10 +61,16 @@
+ #define XtOffsetOf APR_OFFSETOF
+ #define ap_select select
+
++#ifdef APACHE24
++#define unixd_config ap_unixd_config
++#endif
++
++#ifdef APACHE2
+ #define ap_user_id unixd_config.user_id
+ #define ap_group_id unixd_config.group_id
+ #define ap_user_name unixd_config.user_name
+ #define ap_suexec_enabled unixd_config.suexec_enabled
++#endif
+
+ #ifndef S_ISDIR
+ #define S_ISDIR(m) (((m)&(S_IFMT)) == (S_IFDIR))
+@@ -365,42 +375,42 @@
+ #ifdef APACHE2
+
+ #ifdef WIN32
+-#define FCGI_LOG_EMERG __FILE__,__LINE__,APLOG_EMERG,APR_FROM_OS_ERROR(GetLastError())
+-#define FCGI_LOG_ALERT __FILE__,__LINE__,APLOG_ALERT,APR_FROM_OS_ERROR(GetLastError())
+-#define FCGI_LOG_CRIT __FILE__,__LINE__,APLOG_CRIT,APR_FROM_OS_ERROR(GetLastError())
+-#define FCGI_LOG_ERR __FILE__,__LINE__,APLOG_ERR,APR_FROM_OS_ERROR(GetLastError())
+-#define FCGI_LOG_WARN __FILE__,__LINE__,APLOG_WARNING,APR_FROM_OS_ERROR(GetLastError())
+-#define FCGI_LOG_NOTICE __FILE__,__LINE__,APLOG_NOTICE,APR_FROM_OS_ERROR(GetLastError())
+-#define FCGI_LOG_INFO __FILE__,__LINE__,APLOG_INFO,APR_FROM_OS_ERROR(GetLastError())
+-#define FCGI_LOG_DEBUG __FILE__,__LINE__,APLOG_DEBUG,APR_FROM_OS_ERROR(GetLastError())
++#define FCGI_LOG_EMERG APLOG_MARK,APLOG_EMERG,APR_FROM_OS_ERROR(GetLastError())
++#define FCGI_LOG_ALERT APLOG_MARK,APLOG_ALERT,APR_FROM_OS_ERROR(GetLastError())
++#define FCGI_LOG_CRIT APLOG_MARK,APLOG_CRIT,APR_FROM_OS_ERROR(GetLastError())
++#define FCGI_LOG_ERR APLOG_MARK,APLOG_ERR,APR_FROM_OS_ERROR(GetLastError())
++#define FCGI_LOG_WARN APLOG_MARK,APLOG_WARNING,APR_FROM_OS_ERROR(GetLastError())
++#define FCGI_LOG_NOTICE APLOG_MARK,APLOG_NOTICE,APR_FROM_OS_ERROR(GetLastError())
++#define FCGI_LOG_INFO APLOG_MARK,APLOG_INFO,APR_FROM_OS_ERROR(GetLastError())
++#define FCGI_LOG_DEBUG APLOG_MARK,APLOG_DEBUG,APR_FROM_OS_ERROR(GetLastError())
+ #else /* !WIN32 */
+-#define FCGI_LOG_EMERG __FILE__,__LINE__,APLOG_EMERG,APR_FROM_OS_ERROR(errno)
+-#define FCGI_LOG_ALERT __FILE__,__LINE__,APLOG_ALERT,APR_FROM_OS_ERROR(errno)
+-#define FCGI_LOG_CRIT __FILE__,__LINE__,APLOG_CRIT,APR_FROM_OS_ERROR(errno)
+-#define FCGI_LOG_ERR __FILE__,__LINE__,APLOG_ERR,APR_FROM_OS_ERROR(errno)
+-#define FCGI_LOG_WARN __FILE__,__LINE__,APLOG_WARNING,APR_FROM_OS_ERROR(errno)
+-#define FCGI_LOG_NOTICE __FILE__,__LINE__,APLOG_NOTICE,APR_FROM_OS_ERROR(errno)
+-#define FCGI_LOG_INFO __FILE__,__LINE__,APLOG_INFO,APR_FROM_OS_ERROR(errno)
+-#define FCGI_LOG_DEBUG __FILE__,__LINE__,APLOG_DEBUG,APR_FROM_OS_ERROR(errno)
+-#endif
+-
+-#define FCGI_LOG_EMERG_ERRNO __FILE__,__LINE__,APLOG_EMERG,APR_FROM_OS_ERROR(errno)
+-#define FCGI_LOG_ALERT_ERRNO __FILE__,__LINE__,APLOG_ALERT,APR_FROM_OS_ERROR(errno)
+-#define FCGI_LOG_CRIT_ERRNO __FILE__,__LINE__,APLOG_CRIT,APR_FROM_OS_ERROR(errno)
+-#define FCGI_LOG_ERR_ERRNO __FILE__,__LINE__,APLOG_ERR,APR_FROM_OS_ERROR(errno)
+-#define FCGI_LOG_WARN_ERRNO __FILE__,__LINE__,APLOG_WARNING,APR_FROM_OS_ERROR(errno)
+-#define FCGI_LOG_NOTICE_ERRNO __FILE__,__LINE__,APLOG_NOTICE,APR_FROM_OS_ERROR(errno)
+-#define FCGI_LOG_INFO_ERRNO __FILE__,__LINE__,APLOG_INFO,APR_FROM_OS_ERROR(errno)
+-#define FCGI_LOG_DEBUG_ERRNO __FILE__,__LINE__,APLOG_DEBUG,APR_FROM_OS_ERROR(errno)
+-
+-#define FCGI_LOG_EMERG_NOERRNO __FILE__,__LINE__,APLOG_EMERG,0
+-#define FCGI_LOG_ALERT_NOERRNO __FILE__,__LINE__,APLOG_ALERT,0
+-#define FCGI_LOG_CRIT_NOERRNO __FILE__,__LINE__,APLOG_CRIT,0
+-#define FCGI_LOG_ERR_NOERRNO __FILE__,__LINE__,APLOG_ERR,0
+-#define FCGI_LOG_WARN_NOERRNO __FILE__,__LINE__,APLOG_WARNING,0
+-#define FCGI_LOG_NOTICE_NOERRNO __FILE__,__LINE__,APLOG_NOTICE,0
+-#define FCGI_LOG_INFO_NOERRNO __FILE__,__LINE__,APLOG_INFO,0
+-#define FCGI_LOG_DEBUG_NOERRNO __FILE__,__LINE__,APLOG_DEBUG,0
++#define FCGI_LOG_EMERG APLOG_MARK,APLOG_EMERG,APR_FROM_OS_ERROR(errno)
++#define FCGI_LOG_ALERT APLOG_MARK,APLOG_ALERT,APR_FROM_OS_ERROR(errno)
++#define FCGI_LOG_CRIT APLOG_MARK,APLOG_CRIT,APR_FROM_OS_ERROR(errno)
++#define FCGI_LOG_ERR APLOG_MARK,APLOG_ERR,APR_FROM_OS_ERROR(errno)
++#define FCGI_LOG_WARN APLOG_MARK,APLOG_WARNING,APR_FROM_OS_ERROR(errno)
++#define FCGI_LOG_NOTICE APLOG_MARK,APLOG_NOTICE,APR_FROM_OS_ERROR(errno)
++#define FCGI_LOG_INFO APLOG_MARK,APLOG_INFO,APR_FROM_OS_ERROR(errno)
++#define FCGI_LOG_DEBUG APLOG_MARK,APLOG_DEBUG,APR_FROM_OS_ERROR(errno)
++#endif
++
++#define FCGI_LOG_EMERG_ERRNO APLOG_MARK,APLOG_EMERG,APR_FROM_OS_ERROR(errno)
++#define FCGI_LOG_ALERT_ERRNO APLOG_MARK,APLOG_ALERT,APR_FROM_OS_ERROR(errno)
++#define FCGI_LOG_CRIT_ERRNO APLOG_MARK,APLOG_CRIT,APR_FROM_OS_ERROR(errno)
++#define FCGI_LOG_ERR_ERRNO APLOG_MARK,APLOG_ERR,APR_FROM_OS_ERROR(errno)
++#define FCGI_LOG_WARN_ERRNO APLOG_MARK,APLOG_WARNING,APR_FROM_OS_ERROR(errno)
++#define FCGI_LOG_NOTICE_ERRNO APLOG_MARK,APLOG_NOTICE,APR_FROM_OS_ERROR(errno)
++#define FCGI_LOG_INFO_ERRNO APLOG_MARK,APLOG_INFO,APR_FROM_OS_ERROR(errno)
++#define FCGI_LOG_DEBUG_ERRNO APLOG_MARK,APLOG_DEBUG,APR_FROM_OS_ERROR(errno)
++
++#define FCGI_LOG_EMERG_NOERRNO APLOG_MARK,APLOG_EMERG,0
++#define FCGI_LOG_ALERT_NOERRNO APLOG_MARK,APLOG_ALERT,0
++#define FCGI_LOG_CRIT_NOERRNO APLOG_MARK,APLOG_CRIT,0
++#define FCGI_LOG_ERR_NOERRNO APLOG_MARK,APLOG_ERR,0
++#define FCGI_LOG_WARN_NOERRNO APLOG_MARK,APLOG_WARNING,0
++#define FCGI_LOG_NOTICE_NOERRNO APLOG_MARK,APLOG_NOTICE,0
++#define FCGI_LOG_INFO_NOERRNO APLOG_MARK,APLOG_INFO,0
++#define FCGI_LOG_DEBUG_NOERRNO APLOG_MARK,APLOG_DEBUG,0
+
+ #else /* !APACHE2 */
+
+Index: libapache-mod-fastcgi/mod_fastcgi.c
+===================================================================
+--- libapache-mod-fastcgi.orig/mod_fastcgi.c 2012-03-07 14:29:04.017047773 +0100
++++ libapache-mod-fastcgi/mod_fastcgi.c 2012-03-07 14:29:07.841272721 +0100
+@@ -97,6 +97,10 @@
+ } while (0)
+ #endif
+
++#ifdef APACHE24
++module AP_MODULE_DECLARE_DATA fastcgi_module;
++#endif
++
+ /*
+ * Global variables
+ */
+@@ -3014,7 +3018,11 @@
+ ap_hook_fixups(fixups, NULL, NULL, APR_HOOK_MIDDLE);
+ }
+
++#ifdef APACHE24
++AP_DECLARE_MODULE(fastcgi) =
++#else
+ module AP_MODULE_DECLARE_DATA fastcgi_module =
++#endif
+ {
+ STANDARD20_MODULE_STUFF,
+ fcgi_config_create_dir_config, /* per-directory config creator */
diff --git a/www-apache/mod_fastcgi/metadata.xml b/www-apache/mod_fastcgi/metadata.xml
new file mode 100644
index 000000000000..48919ac33d6c
--- /dev/null
+++ b/www-apache/mod_fastcgi/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+ <email>neurogeek@gentoo.org</email>
+ <name>Jesus Rivero</name>
+</maintainer>
+</pkgmetadata>
diff --git a/www-apache/mod_fastcgi/mod_fastcgi-2.4.7_pre0910052141-r1.ebuild b/www-apache/mod_fastcgi/mod_fastcgi-2.4.7_pre0910052141-r1.ebuild
new file mode 100644
index 000000000000..d5996fdca329
--- /dev/null
+++ b/www-apache/mod_fastcgi/mod_fastcgi-2.4.7_pre0910052141-r1.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+inherit apache-module eutils
+
+MY_P="${PN}-SNAP-${PV/2.4.7_pre/}"
+DESCRIPTION="FastCGI is a open extension to CGI without the limitations of server specific APIs"
+HOMEPAGE="http://fastcgi.com/"
+SRC_URI="http://www.fastcgi.com/dist/${MY_P}.tar.gz"
+
+KEYWORDS="~amd64 ~x86"
+SLOT="0"
+LICENSE="mod_fastcgi"
+IUSE=""
+
+APXS2_ARGS="-c mod_fastcgi.c fcgi*.c"
+APACHE2_MOD_CONF="20_${PN}"
+APACHE2_MOD_DEFINE="FASTCGI"
+
+DOCFILES="CHANGES README docs/LICENSE.TERMS docs/mod_fastcgi.html"
+
+S="${WORKDIR}/${MY_P}"
+
+need_apache2
+
+src_prepare() {
+ epatch "${FILESDIR}/${PN}-compile-against-apache2.4.patch"
+}
diff --git a/www-apache/mod_fastcgi/mod_fastcgi-2.4.7_pre0910052141.ebuild b/www-apache/mod_fastcgi/mod_fastcgi-2.4.7_pre0910052141.ebuild
new file mode 100644
index 000000000000..d65fe5fa09a2
--- /dev/null
+++ b/www-apache/mod_fastcgi/mod_fastcgi-2.4.7_pre0910052141.ebuild
@@ -0,0 +1,26 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit apache-module
+
+MY_P="${PN}-SNAP-${PV/2.4.7_pre/}"
+
+DESCRIPTION="FastCGI is a open extension to CGI without the limitations of server specific APIs"
+HOMEPAGE="http://fastcgi.com/"
+SRC_URI="http://www.fastcgi.com/dist/${MY_P}.tar.gz"
+
+KEYWORDS="amd64 x86"
+SLOT="0"
+LICENSE="mod_fastcgi"
+IUSE=""
+
+APXS2_ARGS="-c mod_fastcgi.c fcgi*.c"
+APACHE2_MOD_CONF="20_${PN}"
+APACHE2_MOD_DEFINE="FASTCGI"
+
+DOCFILES="CHANGES README docs/LICENSE.TERMS docs/mod_fastcgi.html"
+
+S="${WORKDIR}/${MY_P}"
+
+need_apache2_2
diff --git a/www-apache/mod_fastcgi_handler/Manifest b/www-apache/mod_fastcgi_handler/Manifest
new file mode 100644
index 000000000000..e221114d54b0
--- /dev/null
+++ b/www-apache/mod_fastcgi_handler/Manifest
@@ -0,0 +1 @@
+DIST mod_fastcgi_handler-0.6.tar.gz 10980 SHA256 1d1676005a50c77101681c054df3e76939b6885060027882d4a506141637c39e
diff --git a/www-apache/mod_fastcgi_handler/files/20_mod_fastcgi_handler.conf b/www-apache/mod_fastcgi_handler/files/20_mod_fastcgi_handler.conf
new file mode 100644
index 000000000000..dd07c33cc100
--- /dev/null
+++ b/www-apache/mod_fastcgi_handler/files/20_mod_fastcgi_handler.conf
@@ -0,0 +1,5 @@
+<IfDefine FASTCGI_HANDLER>
+LoadModule fastcgi_handler_module modules/mod_fastcgi_handler.so
+</IfDefine>
+
+# vim: ts=4 filetype=apache
diff --git a/www-apache/mod_fastcgi_handler/metadata.xml b/www-apache/mod_fastcgi_handler/metadata.xml
new file mode 100644
index 000000000000..52ae9191ee8a
--- /dev/null
+++ b/www-apache/mod_fastcgi_handler/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>neurogeek@gentoo.org</email>
+ <name>Jesus Rivero</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">hollow/mod_fastcgi_handler</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/www-apache/mod_fastcgi_handler/mod_fastcgi_handler-0.6.ebuild b/www-apache/mod_fastcgi_handler/mod_fastcgi_handler-0.6.ebuild
new file mode 100644
index 000000000000..8872d9b2b53c
--- /dev/null
+++ b/www-apache/mod_fastcgi_handler/mod_fastcgi_handler-0.6.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="3"
+
+GITHUB_AUTHOR="hollow"
+GITHUB_PROJECT="mod_fastcgi_handler"
+GITHUB_COMMIT="c5e075b"
+
+inherit apache-module
+
+DESCRIPTION="A simple FastCGI handler module"
+HOMEPAGE="http://github.com/hollow/mod_fastcgi_handler"
+SRC_URI="http://nodeload.github.com/${GITHUB_AUTHOR}/${GITHUB_PROJECT}/tarball/v${PV} -> ${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND=""
+
+S="${WORKDIR}"/${GITHUB_AUTHOR}-${GITHUB_PROJECT}-${GITHUB_COMMIT}
+
+APACHE2_MOD_CONF="20_${PN}"
+APACHE2_MOD_DEFINE="FASTCGI_HANDLER"
+
+APXS2_ARGS="-o ${PN}.so -c *.c"
+
+need_apache2
diff --git a/www-apache/mod_fcgid/Manifest b/www-apache/mod_fcgid/Manifest
new file mode 100644
index 000000000000..93c02e929f59
--- /dev/null
+++ b/www-apache/mod_fcgid/Manifest
@@ -0,0 +1 @@
+DIST mod_fcgid-2.3.9.tar.bz2 80205 SHA256 442c29528e34fefc946dd356fcf8240e1953aed89eb5597fc55898d3d06f183f SHA512 c429c14990cc8b492e88db1aa00fc2593bfb1b129b9001be21670d42c8f3e5038acd3f4556b48f3ac7dfc03c8d3656f0d4402122932e5bdc2c2aab1c7c235121 WHIRLPOOL a872bd74b92ee8c5ed8edec23bfe3d4ebbcff29670883462040c8c2c825b1ad71a42c0e85f8c278c0bef887e7f35e3fb9d931b27a9aa6e99afccf6623674188d
diff --git a/www-apache/mod_fcgid/files/2.2/20_mod_fcgid.conf b/www-apache/mod_fcgid/files/2.2/20_mod_fcgid.conf
new file mode 100644
index 000000000000..38cfa39e0bdf
--- /dev/null
+++ b/www-apache/mod_fcgid/files/2.2/20_mod_fcgid.conf
@@ -0,0 +1,7 @@
+<IfDefine FCGID>
+LoadModule fcgid_module modules/mod_fcgid.so
+SocketPath /var/run/fcgidsock
+SharememPath /var/run/fcgid_shm
+</IfDefine>
+
+# vim: ts=4 filetype=apache
diff --git a/www-apache/mod_fcgid/metadata.xml b/www-apache/mod_fcgid/metadata.xml
new file mode 100644
index 000000000000..43da0685a4b7
--- /dev/null
+++ b/www-apache/mod_fcgid/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>maintainer-needed@gentoo.org</email>
+ </maintainer>
+ <longdescription lang="en">
+ mod_fcgid has a new process management strategy, which concentrates on
+ reducing the number of fastcgi server, and kick out the corrupt fastcgi
+ server as soon as possible.
+ </longdescription>
+</pkgmetadata>
diff --git a/www-apache/mod_fcgid/mod_fcgid-2.3.9-r1.ebuild b/www-apache/mod_fcgid/mod_fcgid-2.3.9-r1.ebuild
new file mode 100644
index 000000000000..6d6d73d567a1
--- /dev/null
+++ b/www-apache/mod_fcgid/mod_fcgid-2.3.9-r1.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit apache-module eutils multilib
+
+DESCRIPTION="A binary-compatible alternative to mod_fastcgi with better process management"
+HOMEPAGE="http://httpd.apache.org/mod_fcgid/"
+SRC_URI="mirror://apache/httpd/mod_fcgid/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~hppa ~ppc ~ppc64 ~x86"
+IUSE=""
+
+APACHE2_MOD_CONF="2.2/20_${PN}"
+APACHE2_MOD_DEFINE="FCGID"
+
+DOCFILES="CHANGES-FCGID README-FCGID STATUS-FCGID"
+
+need_apache2
+
+src_configure() {
+ ./configure.apxs || die "apxs configure failed"
+}
+
+src_compile () {
+ emake
+ ln -sf modules/fcgid/.libs .libs || die "symlink creation failed"
+}
diff --git a/www-apache/mod_fcgid/mod_fcgid-2.3.9.ebuild b/www-apache/mod_fcgid/mod_fcgid-2.3.9.ebuild
new file mode 100644
index 000000000000..4b43cb67b789
--- /dev/null
+++ b/www-apache/mod_fcgid/mod_fcgid-2.3.9.ebuild
@@ -0,0 +1,27 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit apache-module eutils multilib
+
+DESCRIPTION="mod_fcgid is a binary-compatible alternative to mod_fastcgi with better process management"
+HOMEPAGE="http://httpd.apache.org/mod_fcgid/"
+SRC_URI="mirror://apache/httpd/mod_fcgid/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~hppa ppc ~ppc64 x86"
+IUSE=""
+
+APACHE2_MOD_CONF="2.2/20_${PN}"
+APACHE2_MOD_DEFINE="FCGID"
+
+DOCFILES="CHANGES-FCGID README-FCGID STATUS-FCGID"
+
+need_apache2
+
+src_compile () {
+ ./configure.apxs || die "apxs configure failed!"
+ make || die "make failed"
+ ln -sf modules/fcgid/.libs .libs || die "symlink creation failed"
+}
diff --git a/www-apache/mod_flvx/Manifest b/www-apache/mod_flvx/Manifest
new file mode 100644
index 000000000000..67abd450ace6
--- /dev/null
+++ b/www-apache/mod_flvx/Manifest
@@ -0,0 +1 @@
+DIST mod_flvx-0.0.1.tar.bz2 1636 SHA256 bfcd82f5782f86577124ab88339762fe08e3e5a108e80bb56a20e12a6cc951c2
diff --git a/www-apache/mod_flvx/files/20_mod_flvx.conf b/www-apache/mod_flvx/files/20_mod_flvx.conf
new file mode 100644
index 000000000000..72096ca68e38
--- /dev/null
+++ b/www-apache/mod_flvx/files/20_mod_flvx.conf
@@ -0,0 +1,11 @@
+<IfDefine FLVX>
+ LoadModule flvx_module modules/mod_flvx.so
+
+ # Avoiding AddHandler directive for security
+ # https://bugs.gentoo.org/show_bug.cgi?id=544572
+ <FilesMatch "\.flv$">
+ SetHandler flv-stream
+ </FilesMatch>
+</IfDefine>
+
+# vim: ts=4 filetype=apache
diff --git a/www-apache/mod_flvx/metadata.xml b/www-apache/mod_flvx/metadata.xml
new file mode 100644
index 000000000000..4538a68724a6
--- /dev/null
+++ b/www-apache/mod_flvx/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer><email>maintainer-needed@gentoo.org</email></maintainer>
+</pkgmetadata>
diff --git a/www-apache/mod_flvx/mod_flvx-0.0.1-r1.ebuild b/www-apache/mod_flvx/mod_flvx-0.0.1-r1.ebuild
new file mode 100644
index 000000000000..63b7bf3db305
--- /dev/null
+++ b/www-apache/mod_flvx/mod_flvx-0.0.1-r1.ebuild
@@ -0,0 +1,22 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils apache-module
+
+DESCRIPTION="mod_flvx allows to seek inside FLV files for streaming purposes"
+HOMEPAGE="http://journal.paul.querna.org/articles/2006/07/11/mod_flvx/"
+SRC_URI="mirror://gentoo/${P}.tar.bz2"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND=""
+
+APACHE2_MOD_CONF="20_${PN}"
+APACHE2_MOD_DEFINE="FLVX"
+
+need_apache2
diff --git a/www-apache/mod_ftpd/Manifest b/www-apache/mod_ftpd/Manifest
new file mode 100644
index 000000000000..ddea45c3505e
--- /dev/null
+++ b/www-apache/mod_ftpd/Manifest
@@ -0,0 +1 @@
+DIST mod_ftpd-0.14.tar.bz2 330410 SHA256 f36d3b65a5a200fca0c58e453246635e0f8e94c7f870d2b2f1946fa4a8b06d09
diff --git a/www-apache/mod_ftpd/files/0.14-r1/45_mod_ftpd.conf b/www-apache/mod_ftpd/files/0.14-r1/45_mod_ftpd.conf
new file mode 100644
index 000000000000..ab6b39e8ee2a
--- /dev/null
+++ b/www-apache/mod_ftpd/files/0.14-r1/45_mod_ftpd.conf
@@ -0,0 +1,51 @@
+<IfDefine FTPD>
+LoadModule ftpd_module modules/mod_ftpd.so
+
+# Load any of the provider modules here (for user specific chroots)
+#LoadModule ftpd_dbm_module modules/mod_ftpd_dbm.so
+#LoadModule ftpd_dbi_module modules/mod_ftpd_dbi.so
+LoadModule ftpd_default_module modules/mod_ftpd_default.so
+#LoadModule ftpd_fail_module modules/mod_ftpd_fail.so
+
+Listen 21
+<VirtualHost *:21>
+ DocumentRoot /home/ftp
+ FtpProtocol On
+ FtpShowRealPermissions Off
+ FtpAllowActive On
+ FtpPasvMinPort 1024
+ FtpPasvMaxPort 65535
+ FtpLimitOrder default
+ FtpDefaultMaxLogins 100
+
+ <Directory /home/ftp>
+ Anonymous_NoUserID Off
+ Anonymous_MustGiveEmail Off
+ Anonymous_VerifyEmail Off
+ Anonymous_LogEmail Off
+ Anonymous anonymous
+ AuthName ftp
+ AuthType Basic
+ Require valid-user
+ Order allow,deny
+ Allow from all
+ </Directory>
+
+ # only allow changing, retrieving files, and listing on the site
+ <Location />
+ <LimitExcept CHDIR GET LIST>
+ Deny from all
+ </LimitExcept>
+ </Location>
+
+ # allow making directories, listing, chdir, and uploading files.
+ # But don't allow retrieving files.
+ <Location /upload>
+ <LimitExcept LIST PUT MKCOL CHDIR>
+ Deny from all
+ </LimitExcept>
+ </Location>
+</VirtualHost>
+</IfDefine>
+
+# vim: ts=4 filetype=apache
diff --git a/www-apache/mod_ftpd/metadata.xml b/www-apache/mod_ftpd/metadata.xml
new file mode 100644
index 000000000000..4538a68724a6
--- /dev/null
+++ b/www-apache/mod_ftpd/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer><email>maintainer-needed@gentoo.org</email></maintainer>
+</pkgmetadata>
diff --git a/www-apache/mod_ftpd/mod_ftpd-0.14-r1.ebuild b/www-apache/mod_ftpd/mod_ftpd-0.14-r1.ebuild
new file mode 100644
index 000000000000..c4453c5ea902
--- /dev/null
+++ b/www-apache/mod_ftpd/mod_ftpd-0.14-r1.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+
+inherit apache-module
+
+DESCRIPTION="Apache2 module which provides an FTP server"
+HOMEPAGE="http://www.outoforder.cc/projects/apache/mod_ftpd/"
+SRC_URI="http://www.outoforder.cc/downloads/${PN}/${P}.tar.bz2"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="dbi gdbm"
+
+DEPEND="dbi? ( dev-db/libdbi )
+ gdbm? ( sys-libs/gdbm )"
+RDEPEND="${DEPEND}"
+
+APACHE2_EXECFILES="providers/*/.libs/*.so"
+APACHE2_MOD_CONF="0.14-r1/45_${PN}"
+APACHE2_MOD_DEFINE="FTPD"
+
+DOCFILES="docs/manual.html AUTHORS ChangeLog NOTICE README TODO"
+
+need_apache2_2
+
+src_prepare() {
+ sed -i -e 's/-Wc,-Werror//' Makefile.in providers/*/Makefile.in
+}
+
+src_configure() {
+ local providers="default fail"
+
+ use dbi && providers="dbi ${providers}"
+ use gdbm && providers="dbm ${providers}"
+
+ econf \
+ --with-apxs=${APXS} \
+ --enable-providers="${providers}" \
+ || die "econf failed"
+ }
+
+src_compile() {
+ emake || die "emake failed"
+}
diff --git a/www-apache/mod_geoip2/Manifest b/www-apache/mod_geoip2/Manifest
new file mode 100644
index 000000000000..552d4548a4a5
--- /dev/null
+++ b/www-apache/mod_geoip2/Manifest
@@ -0,0 +1 @@
+DIST mod_geoip2_1.2.7.tar.gz 11983 SHA256 76e0512b282e6e2799f5d5616b9e26f448bee263f495ba31d1f72e3be9d0d5b6 SHA512 0ce240c477115af08f7d6b41186c3ea1d29cf4c5c081eb6e55fff8d9b1fd3dcfefe95df544d30d3c2e6c941e72eb719a7d938cd9e3e55fad5a8722bfe112605e WHIRLPOOL bc6466fe63e8e460a7b2a2806238ba3ab2379dce5451b88fea4fdd8fb121938d516ec4afc677e5784f0bc6572f292dfbc02e6410aa7ab4811d4ac4ce1d5d8be2
diff --git a/www-apache/mod_geoip2/files/30_mod_geoip2.conf b/www-apache/mod_geoip2/files/30_mod_geoip2.conf
new file mode 100644
index 000000000000..41206ad7ba0a
--- /dev/null
+++ b/www-apache/mod_geoip2/files/30_mod_geoip2.conf
@@ -0,0 +1,5 @@
+<IfDefine GEOIP>
+LoadModule geoip_module modules/mod_geoip.so
+</IfDefine>
+
+# vim: ts=4 filetype=apache
diff --git a/www-apache/mod_geoip2/files/mod_geoip2-1.2.7-httpd24.patch b/www-apache/mod_geoip2/files/mod_geoip2-1.2.7-httpd24.patch
new file mode 100644
index 000000000000..563e35b1137e
--- /dev/null
+++ b/www-apache/mod_geoip2/files/mod_geoip2-1.2.7-httpd24.patch
@@ -0,0 +1,35 @@
+--- mod_geoip.c.geoip
++++ mod_geoip.c
+@@ -66,6 +66,7 @@
+ #include "http_config.h"
+ #include "http_protocol.h"
+ #include "http_log.h"
++#include "util_script.h"
+ #include "ap_config.h"
+ #include "apr_strings.h"
+ #include <GeoIP.h>
+@@ -320,7 +321,11 @@
+ return DECLINED;
+
+ if (!cfg->scanProxyHeaders) {
++#if AP_MODULE_MAGIC_AT_LEAST(20111130,0)
++ ipaddr = r->useragent_ip;
++#else
+ ipaddr = r->connection->remote_ip;
++#endif
+ }
+ else {
+ ap_add_common_vars(r);
+@@ -338,7 +343,11 @@
+ }
+ if (!ipaddr_ptr) {
+ ap_log_error(APLOG_MARK, APLOG_DEBUG | APLOG_NOERRNO, 0, r->server, "[mod_geoip]: Error while getting ipaddr from proxy headers. Using REMOTE_ADDR.");
+- ipaddr = r->connection->remote_ip;
++#if AP_MODULE_MAGIC_AT_LEAST(20111130,0)
++ ipaddr = r->useragent_ip;
++#else
++ ipaddr = r->connection->remote_ip;
++#endif
+ }
+ else {
+ ap_log_error(APLOG_MARK, APLOG_DEBUG | APLOG_NOERRNO, 0, r->server, "[mod_geoip]: IPADDR_PTR: %s", ipaddr_ptr);
diff --git a/www-apache/mod_geoip2/metadata.xml b/www-apache/mod_geoip2/metadata.xml
new file mode 100644
index 000000000000..4538a68724a6
--- /dev/null
+++ b/www-apache/mod_geoip2/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer><email>maintainer-needed@gentoo.org</email></maintainer>
+</pkgmetadata>
diff --git a/www-apache/mod_geoip2/mod_geoip2-1.2.7-r1.ebuild b/www-apache/mod_geoip2/mod_geoip2-1.2.7-r1.ebuild
new file mode 100644
index 000000000000..ae893b688cf1
--- /dev/null
+++ b/www-apache/mod_geoip2/mod_geoip2-1.2.7-r1.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit apache-module eutils
+
+MY_P="${PN}_${PV}"
+MY_PN="${PN/2}"
+
+DESCRIPTION="Apache 2.x module for finding the country and city
+that a web request originated from"
+HOMEPAGE="http://www.maxmind.com/app/mod_geoip"
+SRC_URI="http://geolite.maxmind.com/download/geoip/api/mod_geoip2/${MY_P}.tar.gz"
+LICENSE="Apache-1.1"
+
+KEYWORDS="~x86 ~amd64"
+IUSE=""
+SLOT="0"
+
+DEPEND=">=dev-libs/geoip-1.4.8"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${MY_P}"
+
+# See apache-module.eclass for more information.
+APACHE2_MOD_CONF="30_${PN}"
+APACHE2_MOD_FILE="${S}/.libs/${MY_PN}.so"
+APXS2_ARGS="-l GeoIP -c ${MY_PN}.c"
+DOCFILES="INSTALL README README.php Changes"
+
+need_apache2
+
+src_unpack() {
+ unpack ${A} && cd "${S}"
+ epatch "${FILESDIR}/${P}-httpd24.patch"
+}
diff --git a/www-apache/mod_gnutls/Manifest b/www-apache/mod_gnutls/Manifest
new file mode 100644
index 000000000000..f48887656d7f
--- /dev/null
+++ b/www-apache/mod_gnutls/Manifest
@@ -0,0 +1,2 @@
+DIST mod_gnutls-0.5.10.tar.bz2 245958 SHA256 469fea5f2f422c459b4153c1b959d5d62568d3ddf87f90ca6fe880c81b3b8374 SHA512 c23fb1380565dc90f805fc1e05f8f1dc4544def16e2740548dea0c575a3f5a1d4148ce3dabd886b90b3a275da9955a82789653861892bf311b605622cc96005e WHIRLPOOL 4266b21fcb9f026eeb24d4b26d56ec23b5c29f1cc7e554979c7644d7aeae9666d2cf6c0ecc1d30f9b50aa41063140fe792f900db7430643f2b9f23fe0823cb8c
+DIST mod_gnutls-0.6.tar.gz 70522 SHA256 5fb2c79fd64f55faabde50c6ba3ef7b959825c8a6130152d00ca18f6d99bc041 SHA512 95e9d0e9bedaa46c5d74f97b95472f552004321f475679889844c8cd9bcff80780a610358a62ee3829159844f9ea87b525ea23eef0fc2aff028e87760b9563b9 WHIRLPOOL 2950abc6e59f8dd5d7fe8ee1b38e3ebd950539f6c880b76bced2ae57d66a312c6abd91c51eedac41709035680938aa27f181d19f1603c70a3310f84fec637e8d
diff --git a/www-apache/mod_gnutls/files/47_mod_gnutls.conf b/www-apache/mod_gnutls/files/47_mod_gnutls.conf
new file mode 100644
index 000000000000..cd88204c9e83
--- /dev/null
+++ b/www-apache/mod_gnutls/files/47_mod_gnutls.conf
@@ -0,0 +1,30 @@
+<IfDefine GNUTLS>
+LoadModule gnutls_module modules/mod_gnutls.so
+
+# mod_gnutls can optionally use a memcached server to store it's SSL Sessions
+# This is useful in a cluster enviroment, where you want all of your servers
+# to share a single SSL Session Cache.
+#GnuTLSCache memcache "127.0.0.1 server2.example.com server3.example.com"
+
+# The Default method is to use a DBM backed Cache. It isn't super fast, but
+# it is portable and does not require another server to be running like memcached.
+GnuTLSCache dbm /var/cache/mod_gnutls/gnutls_cache
+</IfDefine>
+
+# the following is an example virtual-host as you could configure it.
+# however, this is just an example. You should always put your own
+# configuration stuff inside your own files within vhosts.d/ directory.
+#<VirtualHost 1.2.3.4:443>
+# # insert other directives ... here ...
+#
+# # This enables the mod_gnutls Handlers for this Virtual Host
+# GnuTLSEnable On
+#
+# # This is the Private key for your server.
+# GnuTLSKeyFile conf/server.key
+#
+# # This is the Server Certificate.
+# GnuTLSCertificateFile conf/server.cert
+#</VirtualHost>
+
+# vim: ts=4 filetype=apache
diff --git a/www-apache/mod_gnutls/files/mod_gnutls-0.5.10-httpd24.patch b/www-apache/mod_gnutls/files/mod_gnutls-0.5.10-httpd24.patch
new file mode 100644
index 000000000000..bc529efaa0d2
--- /dev/null
+++ b/www-apache/mod_gnutls/files/mod_gnutls-0.5.10-httpd24.patch
@@ -0,0 +1,18 @@
+
+Fix for httpd 2.4.
+
+--- mod_gnutls-0.5.10/src/gnutls_hooks.c.httpd24
++++ mod_gnutls-0.5.10/src/gnutls_hooks.c
+@@ -750,7 +750,12 @@ int mgs_hook_pre_connection(conn_rec * c
+ return DECLINED;
+ }
+
++#if AP_MODULE_MAGIC_AT_LEAST(20111130, 0)
++ /* ### this is a bizarre test -- jorton */
++ if (c->client_addr->hostname || strcmp(c->client_ip,c->local_ip) == 0) {
++#else
+ if (c->remote_addr->hostname || apr_strnatcmp(c->remote_ip,c->local_ip) == 0) {
++#endif
+ /* Connection initiated by Apache (mod_proxy) => ignore */
+ return OK;
+ }
diff --git a/www-apache/mod_gnutls/files/mod_gnutls-0.5.10-no-extra.patch b/www-apache/mod_gnutls/files/mod_gnutls-0.5.10-no-extra.patch
new file mode 100644
index 000000000000..c629f6b6bf6e
--- /dev/null
+++ b/www-apache/mod_gnutls/files/mod_gnutls-0.5.10-no-extra.patch
@@ -0,0 +1,11 @@
+diff -up mod_gnutls-0.5.10/include/mod_gnutls.h.in.no-extra mod_gnutls-0.5.10/include/mod_gnutls.h.in
+--- mod_gnutls-0.5.10/include/mod_gnutls.h.in.no-extra 2011-07-08 23:29:46.000000000 +0200
++++ mod_gnutls-0.5.10/include/mod_gnutls.h.in 2013-03-07 09:08:49.833348848 +0100
+@@ -28,7 +28,6 @@
+ #include "ap_release.h"
+
+ #include <gnutls/gnutls.h>
+-#include <gnutls/extra.h>
+ #include <gnutls/openpgp.h>
+ #include <gnutls/x509.h>
+
diff --git a/www-apache/mod_gnutls/files/mod_gnutls_apr_memcache_m4_dirty.patch b/www-apache/mod_gnutls/files/mod_gnutls_apr_memcache_m4_dirty.patch
new file mode 100644
index 000000000000..028ebe18ef95
--- /dev/null
+++ b/www-apache/mod_gnutls/files/mod_gnutls_apr_memcache_m4_dirty.patch
@@ -0,0 +1,31 @@
+--- mod_gnutls-0.5.10/m4/apr_memcache.m4 2011-07-08 23:29:46.000000000 +0200
++++ mod_gnutls-0.5.10/m4/apr_memcache.m4.new 2011-09-15 20:04:00.117806214 +0200
+@@ -40,21 +40,20 @@
+ if test -n "$apr_memcache_includes"; then
+ apr_memcache_includedir=$apr_memcache_includes
+ elif test -n "$apr_memcache_prefix"; then
+- apr_memcache_includedir=$apr_memcache_prefix/include/apr_memcache-0
++ apr_memcache_includedir=$apr_memcache_prefix/include/aprutil-1
+ else
+- apr_memcache_includedir=$includedir/apr_memcache-0
++ apr_memcache_includedir=$includedir/aprutil-1
+ fi
++
+ CFLAGS="-I$apr_memcache_includedir $CFLAGS"
+
++
+ AC_CHECK_LIB(
+- apr_memcache,
++ aprutil-1,
+ apr_memcache_create,
+ [
+- APR_MEMCACHE_LIBS="-lapr_memcache"
+- if test -n "$apr_memcache_libdir"; then
+- APR_MEMCACHE_LIBS="-R$apr_memcache_libdir -L$apr_memcache_libdir $APR_MEMCACHE_LIBS"
+- fi
+- APR_MEMCACHE_CFLAGS="-I$apr_memcache_includedir"
++ APR_MEMCACHE_LIBS="`apu-1-config --link-ld`"
++ APR_MEMCACHE_CFLAGS="`apu-1-config --includes`"
+ ]
+ )
+ CFLAGS=$save_CFLAGS
diff --git a/www-apache/mod_gnutls/metadata.xml b/www-apache/mod_gnutls/metadata.xml
new file mode 100644
index 000000000000..a1eadd087727
--- /dev/null
+++ b/www-apache/mod_gnutls/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>polynomial-c@gentoo.org</email>
+ <name>Lars Wendler</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/www-apache/mod_gnutls/mod_gnutls-0.5.10-r1.ebuild b/www-apache/mod_gnutls/mod_gnutls-0.5.10-r1.ebuild
new file mode 100644
index 000000000000..8dfb017a4036
--- /dev/null
+++ b/www-apache/mod_gnutls/mod_gnutls-0.5.10-r1.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+inherit apache-module autotools eutils
+
+DESCRIPTION="mod_gnutls uses GnuTLS to provide SSL/TLS encryption for Apache2, similarly to mod_ssl"
+HOMEPAGE="http://www.outoforder.cc/projects/apache/mod_gnutls/"
+SRC_URI="http://www.outoforder.cc/downloads/${PN}/${P}.tar.bz2"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="amd64 ~sparc x86"
+IUSE=""
+
+DEPEND=">=net-libs/gnutls-2.10.0:="
+RDEPEND="${DEPEND}"
+
+APACHE2_MOD_CONF="47_${PN}"
+APACHE2_MOD_DEFINE="GNUTLS"
+
+DOCFILES="NEWS NOTICE README README.ENV"
+
+need_apache2
+
+src_prepare() {
+ epatch "${FILESDIR}/${P}-httpd24.patch"
+ epatch "${FILESDIR}/${PN}_apr_memcache_m4_dirty.patch"
+ epatch "${FILESDIR}/${P}-no-extra.patch"
+
+ sed -e "s/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/" -i configure.ac || die
+
+ epatch_user
+ eautoreconf
+}
+
+src_configure() {
+ econf --with-apxs="${APXS}"
+}
+
+src_compile() {
+ emake
+}
+
+src_install() {
+ mv -f src/.libs/libmod_gnutls.so src/.libs/${PN}.so
+ keepdir /var/cache/${PN}
+ apache-module_src_install
+}
diff --git a/www-apache/mod_gnutls/mod_gnutls-0.6.ebuild b/www-apache/mod_gnutls/mod_gnutls-0.6.ebuild
new file mode 100644
index 000000000000..372abb56936a
--- /dev/null
+++ b/www-apache/mod_gnutls/mod_gnutls-0.6.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit apache-module autotools eutils
+
+DESCRIPTION="mod_gnutls uses GnuTLS to provide SSL/TLS encryption for Apache2, similarly to mod_ssl"
+HOMEPAGE="https://mod.gnutls.org/"
+SRC_URI="https://mod.gnutls.org/downloads/${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~sparc ~x86"
+IUSE=""
+
+DEPEND=">=net-libs/gnutls-2.10.0:="
+RDEPEND="${DEPEND}"
+
+APACHE2_MOD_CONF="47_${PN}"
+APACHE2_MOD_DEFINE="GNUTLS"
+
+DOCFILES="CHANGELOG NOTICE README"
+
+need_apache2
+
+src_prepare() {
+ epatch "${FILESDIR}/${PN}_apr_memcache_m4_dirty.patch"
+
+ sed -e "s/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/" -i configure.ac || die
+
+ epatch_user
+ eautoreconf
+}
+
+src_configure() {
+ econf --with-apxs="${APXS}"
+}
+
+src_compile() {
+ emake
+}
+
+src_install() {
+ mv -f src/.libs/libmod_gnutls.so src/.libs/${PN}.so
+ keepdir /var/cache/${PN}
+ apache-module_src_install
+}
diff --git a/www-apache/mod_h2/Manifest b/www-apache/mod_h2/Manifest
new file mode 100644
index 000000000000..ab8852769393
--- /dev/null
+++ b/www-apache/mod_h2/Manifest
@@ -0,0 +1,13 @@
+DIST mod_h2-0.6.0.tar.gz 2596664 SHA256 0d306096bfa0a134550adbdbaf4a1a067b66b1463d8041ba741322404f62ab67 SHA512 2b2e2c8152fc384d6f902859e33f65f05397ba61bcc91cff5c9c6c0e79384b3f5ad507c1878be914489a60c78942f41558fee571793e1ea8e82811faaa987223 WHIRLPOOL 150d23829718f7acdc476fbab3c7c106fd55fb574f1bac211d3937bbbd31f69b7457363eb261b87518e92997210ebd382e6870fa9481adc57428d1460955e1d3
+DIST mod_h2-0.6.1.tar.gz 2598430 SHA256 bdeec44300f662c524e72f85bc256b7886fe42d29dd3c9ea42fb9824e6b59499 SHA512 60b8328de54c81953e20c7924f418b93275fd880838f43f5e406c29be0bf85560a0b72154c2456b11ce3b9fd5fff8fdff0f32de25ff7a5973a4a61ea60b87b49 WHIRLPOOL d6b5beb2b91386dc769f705a0fce884053a59301c95db8eb8f90b149ad38fd449b7b61c7f60d93abd2bc85b5091cd0034051594dd4179687bf74d02ff7cd354f
+DIST mod_h2-0.6.2.tar.gz 2596303 SHA256 52e5be96a4887c9539975a50411c39831082e5b437348d9bbddf77e04d4ed3e2 SHA512 a2982a2cce2d9f58c730711181157a864d872952dd4d1cd7fd63bcb4d9bdbcc2e7ea5783e589e1a4eb45c6bdc4098e7a6a048c7c8417f9d8129fa80340fe7396 WHIRLPOOL d5e88905093839cf2f5fe315e220f8c9de5244a9a2e1fc7fe75193e1c3c03f04f7bcf8c4516fb0159959cb5641cd6a0f77790da03368983aa0af390684531a6f
+DIST mod_h2-0.6.3.tar.gz 2596545 SHA256 64418954e7a99d963aa0fe8cbba23bfe24409b9ab4313cd2dd2718c4c15da0d0 SHA512 50292f96ff9e70ccdf72917cb0faf2e3ca7d56eed50fb1fe555c7d4e5083e95d6722a5b7865614244f32a0b9ddaea1327c173541b380f397aeb8f43c26090097 WHIRLPOOL 84918f9fe3fc54d288c58894a273c5bc974254610324f2f4f3f2d8e48c1e8f6c6d21258c591ba3b2130fff38e0f53a6fdd389d9b748717643a88369c13af9257
+DIST mod_h2-0.6.4.tar.gz 2598459 SHA256 89b9ca3947d7c1ab23c92a38ec63cade445c7f97f15ec699b067d5f183f6c9c4 SHA512 e1f9944851f880bc1bd47a8e818a786b720c59d0703ce1675ba7f9d2947eb4957053764c5fca43b569416b6e4c3da4f940643eefeefe928c0c8cdf25d18a0462 WHIRLPOOL efb7868b89c6ffa33ad9a8641732285c0941d9d4d782082e1c4b4cada7840bc05374af74ae6da8074d87c7080cab7acd4414ac7890a62e174dc56acd2d2cd9b5
+DIST mod_h2-0.6.5.tar.gz 2600818 SHA256 bc72199c5245b3339ce1c8d7fd799c9f6e3224823b0d96dabd681c6fbde0f615 SHA512 f44a7aab3644f989cbb5117ae7f287fc005a9b09f322670b2de720db14d21755fe9bad66a186f7b9894c7b0b385f48c558fea0c27ce96b6c3c990601fef45223 WHIRLPOOL e6cab1f37c2a19d52fb927c77d8a5d50c867218202a863c9f897ff40854ab17990d3ff14a318942f37094d2b0f7cc4ba7b3e841e5d3060d6ea493ee9ae547a8d
+DIST mod_h2-0.6.6.tar.gz 2601687 SHA256 1fe3bd66cd0f0663fc784fcda5730b1bfd880c5ef105556efd7489fe7eaddc9d SHA512 6328d45412888e88909602d4b380d7546e4dd0c006f3ec5d1a8078fedffe22253ab4218f13a5dfa3ddd35e6f9d83eba99d417f90149ea30db9645ff2a67f5d17 WHIRLPOOL 8144cb4666111bef40e3440493dbff22044e6872c31e88f29f9b7c0e6abde6b1b4a0ba1d65cca6fc1a4d57224309805613f2d903413804c2271205768eecfad6
+DIST mod_h2-0.7.0.tar.gz 2619539 SHA256 b5f79d5c36edc686ba277c1442ffb43419aa8409345ae7d372137fcab5d216fe SHA512 da85e8154879cad8029487c7eb3d8f181da6661dc266e3d89b76f3f8fac2951634c31e8431ec65f8949a2094bc1a4d41a2ea62176f6f2790270d866a2af3ae5b WHIRLPOOL 79936daebf71508a3a33903f2aa43b59dc2410edbbb54a6b0079f52dfbe03c27fb5388e52681aced665113b18dcc5d20c0832120c5e20d9c725e7924b3b5ceca
+DIST mod_h2-0.7.2.tar.gz 2619798 SHA256 55aadbe52a64149c664f012210a8d7dd86d3b4bbea88b6e207b51ff06e992af1 SHA512 ddff88fa32e04650bc0ba77a948317cf5aa6c77a1b0b44222369c5a124876dd9e3e33904c4f67badfd5919a927e2292456539180ab37f8a2b2210954bf46c351 WHIRLPOOL cdf3a3cb2fb42bea27ac4989a2fc81e00e748bed66fe9287977a60e542eb89bfb3db0e430bdee594263dc4cb44bc2c120b5194c1a199e1bb819a8ba42f755d98
+DIST mod_h2-0.7.3.tar.gz 2622569 SHA256 6c2263aa22b20a50500edaab38506af87822515ea7ce177494fd67351a80777c SHA512 6635ac5beefd2193b431bf0a89dd4ac2e9502bf963bb81de5e7ace11fa8bc6d89b2187b889c86b29343c922cd2488d62b7a2d0115af5f582c9719182ea7a2cac WHIRLPOOL 90c810d1b04c3dc5690ac5c8eb335d86ec48bb5ee55bba3b87ab58af6c7e151ef51f294e4f3e501389410a299b0af12661a4b9225703977993dd40b665c40a29
+DIST mod_h2-0.8.0.tar.gz 2622914 SHA256 43cde3e69a07096674e70c8a5ea2e6c626297db8b2801215b456d23be00595e5 SHA512 2b6b7dc01295846d06ffcc4e561fb251f2fd9d1db920820cb61ad6cf90bcf1c8b3835ba93680aac9663b58fd35e47cadadca1ebeaf59f766ba365c035277a871 WHIRLPOOL 0ac4c48008ebe8ec56f4669dfab55fbac2ef62eba381415879fb40b680a8bda4e00f3c1976092a32a7f1179b5621372c5ce00435d2c4da9db709a8e8af9828cc
+DIST mod_h2-0.8.1.tar.gz 2622612 SHA256 3df1d7b90da371be62d2073fffcd3181a44c539321e456cc366a332ea39a4b43 SHA512 5e8df78b626f2faa8db8e6d99ff7e74a821626cab9d5f0019f6f8b8af7d79e51f15123cf014342306d2eac55048c27d49485e7e3cac4b5d85bf9ff3909a80aed WHIRLPOOL be93ddac7cdafc93af8014af81142293c5623474cc416f72133b6332a827ca300c4fa03bb5ea0543185c242b9fed626342c671274a2fe63082e080b7769a5bec
+DIST mod_h2-0.8.2.tar.gz 2622925 SHA256 cc4a67a0c994ce7c08319bd10bc92de7d0293ebaa0c2ece0e4cc6bc8351c06aa SHA512 19d55ab28776f551ee2df157a1ab0f72b0c5362210c5da39911e6b2cbdc7079478404e7179128a31d39c393ca32e453ed2a4db310bd4f720287e9e54046c095f WHIRLPOOL 290c368b7e69d214c805e57fc6ef5790a0a4914a71035358a3ebf1cdaf0fc69ce170b2c266a0d2174c9c0e252991aba5a0de5c5aec754bfb79e37b0fd4be57e3
diff --git a/www-apache/mod_h2/files/mod_h2.conf b/www-apache/mod_h2/files/mod_h2.conf
new file mode 100644
index 000000000000..564e97b66549
--- /dev/null
+++ b/www-apache/mod_h2/files/mod_h2.conf
@@ -0,0 +1,8 @@
+<IfDefine HTTP2>
+
+LoadModule h2_module modules/mod_h2.so
+
+# See https://github.com/icing/mod_h2#configuration for more options.
+H2Engine on
+
+</IfDefine>
diff --git a/www-apache/mod_h2/metadata.xml b/www-apache/mod_h2/metadata.xml
new file mode 100644
index 000000000000..e18f78df8259
--- /dev/null
+++ b/www-apache/mod_h2/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>vapier@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">icing/mod_h2</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/www-apache/mod_h2/mod_h2-0.6.0.ebuild b/www-apache/mod_h2/mod_h2-0.6.0.ebuild
new file mode 100644
index 000000000000..ac4ded9c23d9
--- /dev/null
+++ b/www-apache/mod_h2/mod_h2-0.6.0.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit apache-module
+
+if [[ ${PV} == 9999 ]] ; then
+ EGIT_REPO_URI="https://github.com/icing/mod_h2.git"
+ inherit git-2
+else
+ SRC_URI="https://github.com/icing/mod_h2/releases/download/v${PV}/${P}.tar.gz"
+ KEYWORDS="~amd64 ~x86"
+fi
+
+DESCRIPTION="HTTP/2 module for Apache"
+HOMEPAGE="https://github.com/icing/mod_h2"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+IUSE="ssl"
+
+RDEPEND="=net-libs/nghttp2-0.7*"
+DEPEND="${RDEPEND}"
+
+need_apache2_4
+
+src_configure() {
+ econf \
+ --docdir='$(datarootdir)'/doc/${PF} \
+ --disable-werror \
+ --disable-sandbox
+}
+
+src_compile() {
+ default
+}
+
+src_install() {
+ default
+
+ APACHE2_MOD_DEFINE="HTTP2"
+ insinto "${APACHE_MODULES_CONFDIR}"
+ newins "${FILESDIR}/mod_h2.conf" "75_mod_h2.conf"
+}
diff --git a/www-apache/mod_h2/mod_h2-0.6.1.ebuild b/www-apache/mod_h2/mod_h2-0.6.1.ebuild
new file mode 100644
index 000000000000..b9087ff785cf
--- /dev/null
+++ b/www-apache/mod_h2/mod_h2-0.6.1.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit apache-module
+
+if [[ ${PV} == 9999 ]] ; then
+ EGIT_REPO_URI="https://github.com/icing/mod_h2.git"
+ inherit git-2
+else
+ SRC_URI="https://github.com/icing/mod_h2/releases/download/v${PV}/${P}.tar.gz"
+ KEYWORDS="~amd64 ~x86"
+fi
+
+DESCRIPTION="HTTP/2 module for Apache"
+HOMEPAGE="https://github.com/icing/mod_h2"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+IUSE="ssl"
+
+RDEPEND="=net-libs/nghttp2-0.7*
+ ssl? ( www-servers/apache[alpn] )"
+DEPEND="${RDEPEND}"
+
+need_apache2_4
+
+src_configure() {
+ econf \
+ --docdir='$(datarootdir)'/doc/${PF} \
+ --disable-werror \
+ --disable-sandbox
+}
+
+src_compile() {
+ default
+}
+
+src_install() {
+ default
+
+ APACHE2_MOD_DEFINE="HTTP2"
+ insinto "${APACHE_MODULES_CONFDIR}"
+ newins "${FILESDIR}/mod_h2.conf" "75_mod_h2.conf"
+}
diff --git a/www-apache/mod_h2/mod_h2-0.6.2.ebuild b/www-apache/mod_h2/mod_h2-0.6.2.ebuild
new file mode 100644
index 000000000000..b9087ff785cf
--- /dev/null
+++ b/www-apache/mod_h2/mod_h2-0.6.2.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit apache-module
+
+if [[ ${PV} == 9999 ]] ; then
+ EGIT_REPO_URI="https://github.com/icing/mod_h2.git"
+ inherit git-2
+else
+ SRC_URI="https://github.com/icing/mod_h2/releases/download/v${PV}/${P}.tar.gz"
+ KEYWORDS="~amd64 ~x86"
+fi
+
+DESCRIPTION="HTTP/2 module for Apache"
+HOMEPAGE="https://github.com/icing/mod_h2"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+IUSE="ssl"
+
+RDEPEND="=net-libs/nghttp2-0.7*
+ ssl? ( www-servers/apache[alpn] )"
+DEPEND="${RDEPEND}"
+
+need_apache2_4
+
+src_configure() {
+ econf \
+ --docdir='$(datarootdir)'/doc/${PF} \
+ --disable-werror \
+ --disable-sandbox
+}
+
+src_compile() {
+ default
+}
+
+src_install() {
+ default
+
+ APACHE2_MOD_DEFINE="HTTP2"
+ insinto "${APACHE_MODULES_CONFDIR}"
+ newins "${FILESDIR}/mod_h2.conf" "75_mod_h2.conf"
+}
diff --git a/www-apache/mod_h2/mod_h2-0.6.3.ebuild b/www-apache/mod_h2/mod_h2-0.6.3.ebuild
new file mode 100644
index 000000000000..b9087ff785cf
--- /dev/null
+++ b/www-apache/mod_h2/mod_h2-0.6.3.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit apache-module
+
+if [[ ${PV} == 9999 ]] ; then
+ EGIT_REPO_URI="https://github.com/icing/mod_h2.git"
+ inherit git-2
+else
+ SRC_URI="https://github.com/icing/mod_h2/releases/download/v${PV}/${P}.tar.gz"
+ KEYWORDS="~amd64 ~x86"
+fi
+
+DESCRIPTION="HTTP/2 module for Apache"
+HOMEPAGE="https://github.com/icing/mod_h2"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+IUSE="ssl"
+
+RDEPEND="=net-libs/nghttp2-0.7*
+ ssl? ( www-servers/apache[alpn] )"
+DEPEND="${RDEPEND}"
+
+need_apache2_4
+
+src_configure() {
+ econf \
+ --docdir='$(datarootdir)'/doc/${PF} \
+ --disable-werror \
+ --disable-sandbox
+}
+
+src_compile() {
+ default
+}
+
+src_install() {
+ default
+
+ APACHE2_MOD_DEFINE="HTTP2"
+ insinto "${APACHE_MODULES_CONFDIR}"
+ newins "${FILESDIR}/mod_h2.conf" "75_mod_h2.conf"
+}
diff --git a/www-apache/mod_h2/mod_h2-0.6.4.ebuild b/www-apache/mod_h2/mod_h2-0.6.4.ebuild
new file mode 100644
index 000000000000..d2033e1067c4
--- /dev/null
+++ b/www-apache/mod_h2/mod_h2-0.6.4.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit apache-module
+
+if [[ ${PV} == 9999 ]] ; then
+ EGIT_REPO_URI="https://github.com/icing/mod_h2.git"
+ inherit git-2
+else
+ SRC_URI="https://github.com/icing/mod_h2/releases/download/v${PV}/${P}.tar.gz"
+ KEYWORDS="~amd64 ~x86"
+fi
+
+DESCRIPTION="HTTP/2 module for Apache"
+HOMEPAGE="https://github.com/icing/mod_h2"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+IUSE="ssl"
+
+RDEPEND="=net-libs/nghttp2-0.7*
+ ssl? ( www-servers/apache[alpn] )"
+DEPEND="${RDEPEND}"
+
+# The mpm_prefork module doesn't work right. See upstream docs.
+# The threads logic is to handle the default eclass behavior which selects a
+# default mpm via the USE=threads flag.
+RDEPEND+="
+ || (
+ www-servers/apache[apache2_mpms_worker]
+ www-servers/apache[apache2_mpms_event]
+ www-servers/apache[threads,-apache2_mpms_prefork,-apache2_mpms_peruser]
+ )"
+
+need_apache2_4
+
+src_configure() {
+ econf \
+ --docdir='$(datarootdir)'/doc/${PF} \
+ --disable-werror \
+ --disable-sandbox
+}
+
+src_compile() {
+ default
+}
+
+src_install() {
+ default
+
+ APACHE2_MOD_DEFINE="HTTP2"
+ insinto "${APACHE_MODULES_CONFDIR}"
+ newins "${FILESDIR}/mod_h2.conf" "75_mod_h2.conf"
+}
diff --git a/www-apache/mod_h2/mod_h2-0.6.5.ebuild b/www-apache/mod_h2/mod_h2-0.6.5.ebuild
new file mode 100644
index 000000000000..d2033e1067c4
--- /dev/null
+++ b/www-apache/mod_h2/mod_h2-0.6.5.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit apache-module
+
+if [[ ${PV} == 9999 ]] ; then
+ EGIT_REPO_URI="https://github.com/icing/mod_h2.git"
+ inherit git-2
+else
+ SRC_URI="https://github.com/icing/mod_h2/releases/download/v${PV}/${P}.tar.gz"
+ KEYWORDS="~amd64 ~x86"
+fi
+
+DESCRIPTION="HTTP/2 module for Apache"
+HOMEPAGE="https://github.com/icing/mod_h2"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+IUSE="ssl"
+
+RDEPEND="=net-libs/nghttp2-0.7*
+ ssl? ( www-servers/apache[alpn] )"
+DEPEND="${RDEPEND}"
+
+# The mpm_prefork module doesn't work right. See upstream docs.
+# The threads logic is to handle the default eclass behavior which selects a
+# default mpm via the USE=threads flag.
+RDEPEND+="
+ || (
+ www-servers/apache[apache2_mpms_worker]
+ www-servers/apache[apache2_mpms_event]
+ www-servers/apache[threads,-apache2_mpms_prefork,-apache2_mpms_peruser]
+ )"
+
+need_apache2_4
+
+src_configure() {
+ econf \
+ --docdir='$(datarootdir)'/doc/${PF} \
+ --disable-werror \
+ --disable-sandbox
+}
+
+src_compile() {
+ default
+}
+
+src_install() {
+ default
+
+ APACHE2_MOD_DEFINE="HTTP2"
+ insinto "${APACHE_MODULES_CONFDIR}"
+ newins "${FILESDIR}/mod_h2.conf" "75_mod_h2.conf"
+}
diff --git a/www-apache/mod_h2/mod_h2-0.6.6.ebuild b/www-apache/mod_h2/mod_h2-0.6.6.ebuild
new file mode 100644
index 000000000000..d2033e1067c4
--- /dev/null
+++ b/www-apache/mod_h2/mod_h2-0.6.6.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit apache-module
+
+if [[ ${PV} == 9999 ]] ; then
+ EGIT_REPO_URI="https://github.com/icing/mod_h2.git"
+ inherit git-2
+else
+ SRC_URI="https://github.com/icing/mod_h2/releases/download/v${PV}/${P}.tar.gz"
+ KEYWORDS="~amd64 ~x86"
+fi
+
+DESCRIPTION="HTTP/2 module for Apache"
+HOMEPAGE="https://github.com/icing/mod_h2"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+IUSE="ssl"
+
+RDEPEND="=net-libs/nghttp2-0.7*
+ ssl? ( www-servers/apache[alpn] )"
+DEPEND="${RDEPEND}"
+
+# The mpm_prefork module doesn't work right. See upstream docs.
+# The threads logic is to handle the default eclass behavior which selects a
+# default mpm via the USE=threads flag.
+RDEPEND+="
+ || (
+ www-servers/apache[apache2_mpms_worker]
+ www-servers/apache[apache2_mpms_event]
+ www-servers/apache[threads,-apache2_mpms_prefork,-apache2_mpms_peruser]
+ )"
+
+need_apache2_4
+
+src_configure() {
+ econf \
+ --docdir='$(datarootdir)'/doc/${PF} \
+ --disable-werror \
+ --disable-sandbox
+}
+
+src_compile() {
+ default
+}
+
+src_install() {
+ default
+
+ APACHE2_MOD_DEFINE="HTTP2"
+ insinto "${APACHE_MODULES_CONFDIR}"
+ newins "${FILESDIR}/mod_h2.conf" "75_mod_h2.conf"
+}
diff --git a/www-apache/mod_h2/mod_h2-0.7.0.ebuild b/www-apache/mod_h2/mod_h2-0.7.0.ebuild
new file mode 100644
index 000000000000..05741c67f94c
--- /dev/null
+++ b/www-apache/mod_h2/mod_h2-0.7.0.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit apache-module
+
+if [[ ${PV} == 9999 ]] ; then
+ EGIT_REPO_URI="https://github.com/icing/mod_h2.git"
+ inherit git-2
+else
+ SRC_URI="https://github.com/icing/mod_h2/releases/download/v${PV}/${P}.tar.gz"
+ KEYWORDS="~amd64 ~x86"
+fi
+
+DESCRIPTION="HTTP/2 module for Apache"
+HOMEPAGE="https://github.com/icing/mod_h2"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+IUSE="ssl"
+
+RDEPEND=">=net-libs/nghttp2-1.0
+ ssl? ( www-servers/apache[alpn] )"
+DEPEND="${RDEPEND}"
+
+# The mpm_prefork module doesn't work right. See upstream docs.
+# The threads logic is to handle the default eclass behavior which selects a
+# default mpm via the USE=threads flag.
+RDEPEND+="
+ || (
+ www-servers/apache[apache2_mpms_worker]
+ www-servers/apache[apache2_mpms_event]
+ www-servers/apache[threads,-apache2_mpms_prefork,-apache2_mpms_peruser]
+ )"
+
+need_apache2_4
+
+src_configure() {
+ econf \
+ --docdir='$(datarootdir)'/doc/${PF} \
+ --disable-werror \
+ --disable-sandbox
+}
+
+src_compile() {
+ default
+}
+
+src_install() {
+ default
+
+ APACHE2_MOD_DEFINE="HTTP2"
+ insinto "${APACHE_MODULES_CONFDIR}"
+ newins "${FILESDIR}/mod_h2.conf" "75_mod_h2.conf"
+}
diff --git a/www-apache/mod_h2/mod_h2-0.7.2.ebuild b/www-apache/mod_h2/mod_h2-0.7.2.ebuild
new file mode 100644
index 000000000000..05741c67f94c
--- /dev/null
+++ b/www-apache/mod_h2/mod_h2-0.7.2.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit apache-module
+
+if [[ ${PV} == 9999 ]] ; then
+ EGIT_REPO_URI="https://github.com/icing/mod_h2.git"
+ inherit git-2
+else
+ SRC_URI="https://github.com/icing/mod_h2/releases/download/v${PV}/${P}.tar.gz"
+ KEYWORDS="~amd64 ~x86"
+fi
+
+DESCRIPTION="HTTP/2 module for Apache"
+HOMEPAGE="https://github.com/icing/mod_h2"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+IUSE="ssl"
+
+RDEPEND=">=net-libs/nghttp2-1.0
+ ssl? ( www-servers/apache[alpn] )"
+DEPEND="${RDEPEND}"
+
+# The mpm_prefork module doesn't work right. See upstream docs.
+# The threads logic is to handle the default eclass behavior which selects a
+# default mpm via the USE=threads flag.
+RDEPEND+="
+ || (
+ www-servers/apache[apache2_mpms_worker]
+ www-servers/apache[apache2_mpms_event]
+ www-servers/apache[threads,-apache2_mpms_prefork,-apache2_mpms_peruser]
+ )"
+
+need_apache2_4
+
+src_configure() {
+ econf \
+ --docdir='$(datarootdir)'/doc/${PF} \
+ --disable-werror \
+ --disable-sandbox
+}
+
+src_compile() {
+ default
+}
+
+src_install() {
+ default
+
+ APACHE2_MOD_DEFINE="HTTP2"
+ insinto "${APACHE_MODULES_CONFDIR}"
+ newins "${FILESDIR}/mod_h2.conf" "75_mod_h2.conf"
+}
diff --git a/www-apache/mod_h2/mod_h2-0.7.3.ebuild b/www-apache/mod_h2/mod_h2-0.7.3.ebuild
new file mode 100644
index 000000000000..2890e5a789ae
--- /dev/null
+++ b/www-apache/mod_h2/mod_h2-0.7.3.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit apache-module
+
+if [[ ${PV} == 9999 ]] ; then
+ EGIT_REPO_URI="https://github.com/icing/mod_h2.git"
+ inherit git-2
+else
+ SRC_URI="https://github.com/icing/mod_h2/releases/download/v${PV}/${P}.tar.gz"
+ KEYWORDS="~amd64 ~x86"
+fi
+
+DESCRIPTION="HTTP/2 module for Apache"
+HOMEPAGE="https://github.com/icing/mod_h2"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+IUSE="ssl"
+
+RDEPEND=">=net-libs/nghttp2-1.0
+ ssl? ( www-servers/apache[alpn] )"
+DEPEND="${RDEPEND}"
+
+need_apache2_4
+
+src_configure() {
+ econf \
+ --docdir='$(datarootdir)'/doc/${PF} \
+ --disable-werror \
+ --disable-sandbox
+}
+
+src_compile() {
+ default
+}
+
+src_install() {
+ default
+
+ APACHE2_MOD_DEFINE="HTTP2"
+ insinto "${APACHE_MODULES_CONFDIR}"
+ newins "${FILESDIR}/mod_h2.conf" "75_mod_h2.conf"
+}
diff --git a/www-apache/mod_h2/mod_h2-0.8.0.ebuild b/www-apache/mod_h2/mod_h2-0.8.0.ebuild
new file mode 100644
index 000000000000..2890e5a789ae
--- /dev/null
+++ b/www-apache/mod_h2/mod_h2-0.8.0.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit apache-module
+
+if [[ ${PV} == 9999 ]] ; then
+ EGIT_REPO_URI="https://github.com/icing/mod_h2.git"
+ inherit git-2
+else
+ SRC_URI="https://github.com/icing/mod_h2/releases/download/v${PV}/${P}.tar.gz"
+ KEYWORDS="~amd64 ~x86"
+fi
+
+DESCRIPTION="HTTP/2 module for Apache"
+HOMEPAGE="https://github.com/icing/mod_h2"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+IUSE="ssl"
+
+RDEPEND=">=net-libs/nghttp2-1.0
+ ssl? ( www-servers/apache[alpn] )"
+DEPEND="${RDEPEND}"
+
+need_apache2_4
+
+src_configure() {
+ econf \
+ --docdir='$(datarootdir)'/doc/${PF} \
+ --disable-werror \
+ --disable-sandbox
+}
+
+src_compile() {
+ default
+}
+
+src_install() {
+ default
+
+ APACHE2_MOD_DEFINE="HTTP2"
+ insinto "${APACHE_MODULES_CONFDIR}"
+ newins "${FILESDIR}/mod_h2.conf" "75_mod_h2.conf"
+}
diff --git a/www-apache/mod_h2/mod_h2-0.8.1.ebuild b/www-apache/mod_h2/mod_h2-0.8.1.ebuild
new file mode 100644
index 000000000000..2890e5a789ae
--- /dev/null
+++ b/www-apache/mod_h2/mod_h2-0.8.1.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit apache-module
+
+if [[ ${PV} == 9999 ]] ; then
+ EGIT_REPO_URI="https://github.com/icing/mod_h2.git"
+ inherit git-2
+else
+ SRC_URI="https://github.com/icing/mod_h2/releases/download/v${PV}/${P}.tar.gz"
+ KEYWORDS="~amd64 ~x86"
+fi
+
+DESCRIPTION="HTTP/2 module for Apache"
+HOMEPAGE="https://github.com/icing/mod_h2"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+IUSE="ssl"
+
+RDEPEND=">=net-libs/nghttp2-1.0
+ ssl? ( www-servers/apache[alpn] )"
+DEPEND="${RDEPEND}"
+
+need_apache2_4
+
+src_configure() {
+ econf \
+ --docdir='$(datarootdir)'/doc/${PF} \
+ --disable-werror \
+ --disable-sandbox
+}
+
+src_compile() {
+ default
+}
+
+src_install() {
+ default
+
+ APACHE2_MOD_DEFINE="HTTP2"
+ insinto "${APACHE_MODULES_CONFDIR}"
+ newins "${FILESDIR}/mod_h2.conf" "75_mod_h2.conf"
+}
diff --git a/www-apache/mod_h2/mod_h2-0.8.2.ebuild b/www-apache/mod_h2/mod_h2-0.8.2.ebuild
new file mode 100644
index 000000000000..2890e5a789ae
--- /dev/null
+++ b/www-apache/mod_h2/mod_h2-0.8.2.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit apache-module
+
+if [[ ${PV} == 9999 ]] ; then
+ EGIT_REPO_URI="https://github.com/icing/mod_h2.git"
+ inherit git-2
+else
+ SRC_URI="https://github.com/icing/mod_h2/releases/download/v${PV}/${P}.tar.gz"
+ KEYWORDS="~amd64 ~x86"
+fi
+
+DESCRIPTION="HTTP/2 module for Apache"
+HOMEPAGE="https://github.com/icing/mod_h2"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+IUSE="ssl"
+
+RDEPEND=">=net-libs/nghttp2-1.0
+ ssl? ( www-servers/apache[alpn] )"
+DEPEND="${RDEPEND}"
+
+need_apache2_4
+
+src_configure() {
+ econf \
+ --docdir='$(datarootdir)'/doc/${PF} \
+ --disable-werror \
+ --disable-sandbox
+}
+
+src_compile() {
+ default
+}
+
+src_install() {
+ default
+
+ APACHE2_MOD_DEFINE="HTTP2"
+ insinto "${APACHE_MODULES_CONFDIR}"
+ newins "${FILESDIR}/mod_h2.conf" "75_mod_h2.conf"
+}
diff --git a/www-apache/mod_h2/mod_h2-9999.ebuild b/www-apache/mod_h2/mod_h2-9999.ebuild
new file mode 100644
index 000000000000..2890e5a789ae
--- /dev/null
+++ b/www-apache/mod_h2/mod_h2-9999.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit apache-module
+
+if [[ ${PV} == 9999 ]] ; then
+ EGIT_REPO_URI="https://github.com/icing/mod_h2.git"
+ inherit git-2
+else
+ SRC_URI="https://github.com/icing/mod_h2/releases/download/v${PV}/${P}.tar.gz"
+ KEYWORDS="~amd64 ~x86"
+fi
+
+DESCRIPTION="HTTP/2 module for Apache"
+HOMEPAGE="https://github.com/icing/mod_h2"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+IUSE="ssl"
+
+RDEPEND=">=net-libs/nghttp2-1.0
+ ssl? ( www-servers/apache[alpn] )"
+DEPEND="${RDEPEND}"
+
+need_apache2_4
+
+src_configure() {
+ econf \
+ --docdir='$(datarootdir)'/doc/${PF} \
+ --disable-werror \
+ --disable-sandbox
+}
+
+src_compile() {
+ default
+}
+
+src_install() {
+ default
+
+ APACHE2_MOD_DEFINE="HTTP2"
+ insinto "${APACHE_MODULES_CONFDIR}"
+ newins "${FILESDIR}/mod_h2.conf" "75_mod_h2.conf"
+}
diff --git a/www-apache/mod_jk/Manifest b/www-apache/mod_jk/Manifest
new file mode 100644
index 000000000000..ceb4768bb50a
--- /dev/null
+++ b/www-apache/mod_jk/Manifest
@@ -0,0 +1,2 @@
+DIST tomcat-connectors-1.2.37-src.tar.gz 1528647 SHA256 38a92623ddd28b85bbf54cf77f4c867ccbebafb71233131471623691e4e751f9 SHA512 96d0d3baba661a14a2235424ad7bdd78b8b44db168cabd015cba328a200f3df00aa922fd6afb4cd3cff896591e7aeb65cdde16c641ccff5bdcb84518d8d0862f WHIRLPOOL 4d6b7b24610309f0fa44951dca81e0638aa92646e171df95fa225d1f813841592c687d6204dd0be4fb03303ad84ccee3f2adf54b542ee365877e74caaa5581d4
+DIST tomcat-connectors-1.2.40-src.tar.gz 1526449 SHA256 895e347c4dff74049a848603fb29958e6cf429ea0fc708d514b3a8958236705d SHA512 502424add813e85d725dfd0658809db113510a9ed755d24257fa4ee50224971f9cd679fad4f6b4ecbcca0a6ecd1414c86b0d08023ce123374dc28538f1e53c1c WHIRLPOOL 7a5810727987b4aa76134fd813c611ea813bbd99b68bb283fdebc77ee0e67f00676a410de01984f880611e8033e80fadbb8bc6b480df5d3c5ea4c456cb11fa4b
diff --git a/www-apache/mod_jk/files/88_mod_jk.conf b/www-apache/mod_jk/files/88_mod_jk.conf
new file mode 100644
index 000000000000..60d40baba4f9
--- /dev/null
+++ b/www-apache/mod_jk/files/88_mod_jk.conf
@@ -0,0 +1,160 @@
+<IfDefine JK>
+LoadModule jk_module modules/mod_jk.so
+
+###
+### Where to find workers.properties
+###
+# JkWorkersFile specify the location where mod_jk will find
+# the workers definitions.
+JkWorkersFile /etc/apache2/jk-workers.properties
+
+
+###
+### Where to put mod_jk logs
+###
+# specify the location where mod_jk is going to place its log file.
+JkLogFile /var/log/apache2/mod_jk.log
+
+
+###
+### Set the jk log level [debug/error/info]
+###
+# info log will contains standard mod_jk activity (default).
+# error log will contains also error reports.
+# debug log will contains all informations on mod_jk activity
+JkLogLevel info
+
+
+###
+### Select the log format
+###
+# JkLogStampFormat will configure the date/time format found
+# on mod_jk logfile. Using the strftime() format string it's
+# set by default to "[%a %b %d %H:%M:%S %Y]"
+#JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
+
+
+###
+### JkOptions indicate to send SSL KEY SIZE,
+###
+# The directive JkOptions allow you to set many forwarding
+# options which will enable (+) or disable (-) following option.
+#
+#
+# JkOptions ForwardKeySize , you ask mod_jk, when using ajp13, to
+# forward also the SSL Key Size as required by Servlet API 2.3.
+# This flag shouldn't be set when servlet engine is Tomcat 3.2.x
+# (on by default).
+#
+#
+# JkOptions ForwardURICompat , you told mod_jk to send the URI to
+# Tomcat normally, which is less spec compliant but mod_rewrite
+# compatible, use it for compatibility with Tomcat 3.2.x engines
+# (on by default).
+#
+#
+# JkOptions ForwardURICompatUnparsed , the forwarded URI is unparsed,
+# it's spec compliant but broke mod_rewrite.
+#
+#
+# JkOptions ForwardURIEscaped , the forwarded URI is escaped and
+# Tomcat (since 3.3 rc2) will do the decoding part.
+#
+#
+# JkOptions ForwardDirectories is used in conjunction with Directory-
+# Index directive of Apache web server. As such mod_dir should be
+# available to Apache, statically or dynamically (DSO)
+#
+# When DirectoryIndex is configured, Apache will create sub-requests
+# for each of the local-url's specified in the directive, to determine
+# if there is a local file that matches (this is done by stat-ing the file).
+#
+# If ForwardDirectories is set to false (default) and Apache doesn't
+# find any files that match, Apache will serve the content of the
+# directory (if directive Options specifies Indexes for that directory)
+# or a 403 Forbidden response (if directive Options doesn't specify
+# Indexes for that directory).
+#
+# If ForwardDirectories is set to true and Apache doesn't find any
+# files that match, the request will be forwarded to Tomcat for
+# resolution. This is used in cases when Apache cannot see the index
+# files on the file system for various reasons: Tomcat is running on
+# a different machine, the JSP file has been precompiled etc.
+#
+# Note that locally visible files will take precedence over the ones
+# visible only to Tomcat (i.e. if Apache can see the file, that's
+# the one that's going to get served). This is important if there is
+# more then one type of file that Tomcat normally serves - for
+# instance Velocity pages and JSP pages.
+#
+JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
+
+
+###
+### JkEnvVar forward environment vars
+###
+# The directive JkEnvVar allow you to forward an environment vars
+# from Apache server to Tomcat engine.
+#
+#JkEnvVar SSL_CLIENT_V_START
+
+
+###
+### JkRequestLogFormat set the request format
+###
+# JkRequestLogFormat will configure the format of mod_jk individual
+# request logging. Request logging is configured and enabled on a
+# per virtual host basis. To enable request logging for a virtual
+# host just add a JkRequestLogFormat config. The syntax of the
+# format string is similiar to the Apache LogFormat command, here
+# is a list of the available request log format options:
+#
+# Options Description
+# %b Bytes sent, excluding HTTP headers (CLF format)
+# %B Bytes sent, excluding HTTP headers
+# %H The request protocol
+# %m The request method
+# %p The canonical Port of the server serving the request
+# %q The query string (prepended with a ? if a query string exists, otherwise an empty string)
+# %r First line of request
+# %s Request HTTP status code
+# %T Request duration, elapsed time to handle request in seconds '.' micro seconds
+# %U The URL path requested, not including any query string.
+# %v The canonical ServerName of the server serving the request
+# %V The server name according to the UseCanonicalName setting
+# %w Tomcat worker name
+#
+JkRequestLogFormat "%w %V %T"
+
+
+###
+### JkMount assign specific URLs to Tomcat
+###
+# JkMount directive assign specific URLs to Tomcat. In general the
+# structure of a JkMount directive is:
+#
+# send all requests ending in .jsp to worker1
+# JkMount /*.jsp worker1
+#
+# send all requests ending /servlet to worker1
+# JkMount /*/servlet/ worker1
+#
+# send all requests jsp requests to files located in /otherworker will go worker2
+# JkMount /otherworker/*.jsp worker2
+#
+#
+# You can use the JkMount directive at the top level or inside
+# <VirtualHost> sections of your httpd.conf file.
+#
+
+
+# We specify an autoalias, that makes it possible that apache is still
+# reponsible for serving static html files. All requests of files with
+# the ending .jsp will be redirected to a default Tomcat installation which
+# uses the default profile. Change this to fit your needs.
+jkAutoAlias /var/lib/tomcat-5.5/default/webapps/
+jkMount /*.jsp ajp13
+
+</IfDefine>
+
+# vim: ts=4 filetype=apache
diff --git a/www-apache/mod_jk/files/jk-workers.properties b/www-apache/mod_jk/files/jk-workers.properties
new file mode 100644
index 000000000000..b73892fae9e5
--- /dev/null
+++ b/www-apache/mod_jk/files/jk-workers.properties
@@ -0,0 +1,36 @@
+# workers.properties -
+#
+# This file provides jk derived plugins with the needed information to
+# connect to the different tomcat workers. Note that the distributed
+# version of this file requires modification before it is usable by a
+# plugin.
+#
+# As a general note, the characters $( and ) are used internally to define
+# macros. Do not use them in your own configuration!
+
+# The list of Tomcat workers
+#
+worker.list=ajp13
+
+
+#------ DEFAULT ajp13 WORKER DEFINITION ------------------------------
+#---------------------------------------------------------------------
+#
+
+# Defining a worker named ajp13 and of type ajp13
+# Note that the name and the type do not have to match.
+#
+worker.ajp13.port=8009
+worker.ajp13.host=localhost
+worker.ajp13.type=ajp13
+#
+# Specifies the load balance factor when used with
+# a load balancing worker.
+# Note:
+# ----> lbfactor must be > 0
+# ----> Low lbfactor means less work done by the worker.
+worker.ajp13.lbfactor=1
+
+#
+# Specify the size of the open connection cache.
+worker.ajp13.cachesize=10
diff --git a/www-apache/mod_jk/metadata.xml b/www-apache/mod_jk/metadata.xml
new file mode 100644
index 000000000000..119ebd55b7e4
--- /dev/null
+++ b/www-apache/mod_jk/metadata.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>java</herd>
+ <herd>proxy-maintainers</herd>
+ <maintainer>
+ <email>mike@weisso.com</email>
+ <name>Mike Weissman</name>
+ <description>Proxy maintainer</description>
+ </maintainer>
+ <longdescription>
+ mod_jk is a connector used to connect Tomcat JSP/Servlet
+ container with web servers such as Apache, Netscape,
+ Iplanet, SunOne and even IIS using the AJP protocol.
+ </longdescription>
+</pkgmetadata>
diff --git a/www-apache/mod_jk/mod_jk-1.2.37.ebuild b/www-apache/mod_jk/mod_jk-1.2.37.ebuild
new file mode 100644
index 000000000000..36184271f890
--- /dev/null
+++ b/www-apache/mod_jk/mod_jk-1.2.37.ebuild
@@ -0,0 +1,75 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+
+inherit apache-module java-pkg-2
+
+MY_P="tomcat-connectors-${PV}-src"
+
+KEYWORDS="amd64 ppc x86"
+
+DESCRIPTION="JK module for connecting Tomcat and Apache using the ajp13 protocol"
+HOMEPAGE="http://tomcat.apache.org/connectors-doc/"
+SRC_URI="mirror://apache/tomcat/tomcat-connectors/jk/${MY_P}.tar.gz"
+LICENSE="Apache-2.0"
+SLOT="0"
+IUSE=""
+
+S="${WORKDIR}/${MY_P}/native"
+
+APACHE2_MOD_FILE="${S}/apache-2.0/${PN}.so"
+APACHE2_MOD_CONF="88_${PN}"
+APACHE2_MOD_DEFINE="JK"
+
+DOCFILES="CHANGES"
+CONF_DIR="${WORKDIR}/${MY_P}/conf"
+
+DEPEND=">=virtual/jdk-1.4"
+RDEPEND=""
+
+need_apache
+
+pkg_setup() {
+ java-pkg-2_pkg_setup
+}
+
+src_configure() {
+ econf \
+ --with-apxs=${APXS} \
+ --with-apr-config=/usr/bin/apr-config \
+ || die "econf failed"
+}
+
+src_compile() {
+ emake LIBTOOL="/bin/sh $(pwd)/libtool --silent" || die "emake failed"
+}
+
+src_install() {
+ # install the workers.properties file
+ insinto "${APACHE_CONFDIR}"
+ newins "${CONF_DIR}/workers.properties.minimal" \
+ jk-workers-minimal.properties || die
+ newins "${CONF_DIR}/workers.properties" \
+ jk-workers.properties || die
+ doins "${CONF_DIR}/uriworkermap.properties" || die
+
+ # call the nifty default src_install :-)
+ apache-module_src_install
+}
+
+pkg_postinst() {
+ elog "Tomcat is not a dependency of mod_jk any longer, if you intend"
+ elog "to use it with Tomcat, you have to merge www-servers/tomcat on"
+ elog "your own."
+
+ elog "Advanced Directives and Options can be found at: "
+ elog "http://tomcat.apache.org/connectors-doc/reference/workers.html"
+
+ elog ""
+ elog "JNI Worker Deprecation:"
+ elog "Workers of type jni are broken since a long time."
+ elog "Since there is no more use for them, they have been deprecated now,"
+ elog "and will be removed in a future release."
+}
diff --git a/www-apache/mod_jk/mod_jk-1.2.40.ebuild b/www-apache/mod_jk/mod_jk-1.2.40.ebuild
new file mode 100644
index 000000000000..16f4624818fc
--- /dev/null
+++ b/www-apache/mod_jk/mod_jk-1.2.40.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+inherit apache-module java-pkg-opt-2 readme.gentoo
+
+MY_P="tomcat-connectors-${PV#-*}-src"
+
+KEYWORDS="amd64 ~ppc x86"
+
+DESCRIPTION="JK module for connecting Tomcat and Apache using the ajp13 protocol."
+HOMEPAGE="http://tomcat.apache.org/connectors-doc/"
+SRC_URI="mirror://apache/tomcat/tomcat-connectors/jk/${MY_P}.tar.gz"
+LICENSE="Apache-2.0"
+SLOT="0"
+IUSE="java"
+
+S="${WORKDIR}/${MY_P}/native"
+
+APACHE2_MOD_FILE="${S}/apache-2.0/${PN}.so"
+APACHE2_MOD_CONF="88_${PN}"
+APACHE2_MOD_DEFINE="JK"
+
+CONF_DIR="${WORKDIR}/${MY_P}/conf"
+
+DEPEND="java? ( >=virtual/jdk-1.4 )"
+RDEPEND=""
+
+need_apache
+
+DOC_CONTENTS="
+ Advanced Directives and Options can be found at:
+ http://tomcat.apache.org/connectors-doc/reference/workers.html
+"
+
+pkg_setup() {
+ if use java ; then
+ java-pkg-2_pkg_setup
+ fi
+}
+
+src_configure() {
+ econf \
+ --with-apxs=${APXS} \
+ --with-apr-config=/usr/bin/apr-config
+}
+
+src_compile() {
+ emake LIBTOOL="/bin/sh $(pwd)/libtool --silent"
+}
+
+src_install() {
+ # install the workers.properties file
+ insinto "${APACHE_CONFDIR}"
+ newins "${CONF_DIR}/workers.properties.minimal" \
+ jk-workers-minimal.properties
+ newins "${CONF_DIR}/workers.properties" \
+ jk-workers.properties
+ doins "${CONF_DIR}/uriworkermap.properties"
+
+ # call the nifty default src_install
+ apache-module_src_install
+
+ readme.gentoo_create_doc
+}
diff --git a/www-apache/mod_layout/Manifest b/www-apache/mod_layout/Manifest
new file mode 100644
index 000000000000..58dc3346f5f4
--- /dev/null
+++ b/www-apache/mod_layout/Manifest
@@ -0,0 +1 @@
+DIST mod_layout-5.1.tar.gz 12798 SHA256 d00299e3aae38704096477377d20a5c5bcc32fe7802044358a79a31248cd23c6 SHA512 c4a9273da116a1c21356bbd3c8abd6b6ff82604fb5b5a01fd72e41ef8cc77427ad12d395436af894f4b10a227025d1dd45f68150ae6bad073d60820ac6753014 WHIRLPOOL b9966f313c134b6a498793bb2cc8a6a93ab7f604ad62ebee1d23821195265e7c97715172f5481e1ca204790bb112272f8b410a861b54b8f7838523862823ad8f
diff --git a/www-apache/mod_layout/files/15_mod_layout.conf b/www-apache/mod_layout/files/15_mod_layout.conf
new file mode 100644
index 000000000000..5e652ae1cab1
--- /dev/null
+++ b/www-apache/mod_layout/files/15_mod_layout.conf
@@ -0,0 +1,148 @@
+<IfDefine LAYOUT>
+LoadModule layout_module modules/mod_layout.so
+
+<Directory /home/*/public_html>
+# This default configuration adds a footer to every html page in ~user
+# "Powered by Gentoo Linux"
+
+# Enable the filter for all text/html pages
+# use LayoutHandler for Apache1 and AddOutputFilter for Apache2
+#LayoutHandler text/html
+#AddOutputFilterByType LAYOUT text/html
+
+# This directives makes sure that all Layout headers and footers
+# get Cache-Control: no-cache methods in all situations. This
+# directive either takes On or Off."
+# LayoutCacheNeeded
+
+# A URI which prints the header contents.
+# LayoutHeader
+
+# A URI which prints the footer contents.
+LayoutFooter "<p>Powered by <a href='http://www.gentoo.org'>Gentoo Linux</a></p>"
+
+# Add a layout to be inserted when a tag is found, this takes two
+# options, with a third optional parameter. The first is a pattern,
+# the second is the layout and the third is how the layout should be
+# inserts (either prepend, append, or replace). The default is to
+# replace.
+# Layout "<-- replace_me -->" "<p>Visit: <a href=http://www.gentoo.org/>Gentoo Linux</a></p>" replace
+
+# Enter a URI that should be ignored, regular expressions are allowed.
+# LayoutIgnoreURI
+
+# Enter a URI that should be ignored by the header, regular expressions
+# are allowed.
+# LayoutIgnoreHeaderURI
+
+# Enter a URI that should be ignored by the HTTPHeader, regular
+# expressions are allowed.
+# LayoutIgnoreHTTPHeaderURI
+
+# Enter a URI that should be ignored by the footer, regular expressions
+# are allowed.
+# LayoutIgnoreFooterURI
+
+# This can either be On or Off (default it Off). It places HTML comments
+# in the outbound text describing when and where mod_layout has been
+# inserting text.
+LayoutComment On
+
+# This can either be On or Off (default it Off). This is both
+# experimental and probably quite broke.
+# LayoutProxy
+
+# This can either be On or Off (default it On). When off the original
+# document is not displayed.
+# LayoutDisplayOriginal
+
+# Turns On (default) or Off a list of standard types to handle.
+# LayoutDefaultHandlers
+
+# This takes a SSI style timme format that can be used to change the
+# output by mod_layout's internal TIME environmental variables that
+# it introduces.
+# LayoutTimeFormat
+
+# Takes a URI to call for the HTTP Header.
+# LayoutHTTPHeader
+
+# Specify handlers that mod_layout should produce HTTP headers for.
+# LayoutHTTPOverrideHandler
+
+# Specify URI's that mod_layout should produce HTTP headers for.
+# LayoutHTTPOverrideURI
+
+# This takes no arguments. If found it will turn off the footer.
+# LayoutFooterOff
+
+# This takes no arguments. If found it will turn off the header.
+# LayoutHeaderOff
+
+# This takes no arguments. If found it will turn off the http header.
+# LayoutHTTPHeaderOff
+
+# Turns on and off asynchronous POSTs (AKA everything can see the post
+# data).
+# LayoutPostAsync
+
+# This moves the default cache from /tmp to another directory(or a
+# RAM disk).
+# LayoutCache
+
+# Turning this On or Off afffects whether or not headers and footers
+# are appended when creating subsections.
+# LayoutAppend
+
+# Turning this on and off will tell mod_layout to attempt to resolve
+# content (do a merger of the footer, body and header text
+# LayoutMerge
+
+# Use this to change the default begin tag to use during merges (the
+# default string is \<HTML>\
+# LayoutMergeBeginTag
+
+# Use this to change the default end tag to use during merges (the
+# default string is \<\\HTML>\
+# LayoutMergeEndTag
+
+# Use this to change the default end tag to use during merges (the
+# default string is \<\\HTML>\
+# LayoutHeaderAppend
+
+# Use this to change the default end tag to use during merges (the
+# default string is \<\\HTML>\
+# LayoutFooterAppend
+
+# When enabled (it takes on and off flags) mod_layout will not try
+# to wrap any errors. Merge must be enabled for this to work. The
+# default for this is off.
+# LayoutMergeErrorIgnore
+
+# If this tag is found during a merge, no footer or header will be
+# inserted into the document
+# LayoutIgnoreTag
+
+# If this tag is found during a merge, no footer will be inserted
+# into the document
+# LayoutIgnoreTagFooter
+
+# If this tag is found during a merge, no header will be inserted
+# into the document
+# LayoutIgnoreTagHeader
+
+# This turns on mod_layout's own text/html and text/plain handler
+# LayoutHTMLHandler
+
+# If this is enabled and you are doing a merge, the tags used for the
+# merge will be replaced.
+# LayoutReplaceTags
+
+# If you want applications to do notes (a set of directives to control
+# actions inside apache).
+# LayoutNotes
+
+</Directory>
+</IfDefine>
+
+# vim: ts=4 filetype=apache
diff --git a/www-apache/mod_layout/metadata.xml b/www-apache/mod_layout/metadata.xml
new file mode 100644
index 000000000000..4538a68724a6
--- /dev/null
+++ b/www-apache/mod_layout/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer><email>maintainer-needed@gentoo.org</email></maintainer>
+</pkgmetadata>
diff --git a/www-apache/mod_layout/mod_layout-5.1.ebuild b/www-apache/mod_layout/mod_layout-5.1.ebuild
new file mode 100644
index 000000000000..d8b4a8d602ac
--- /dev/null
+++ b/www-apache/mod_layout/mod_layout-5.1.ebuild
@@ -0,0 +1,26 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit apache-module
+
+DESCRIPTION="An Apache2 module for adding custom headers and/or footers"
+HOMEPAGE="http://tangent.org/index.pl?node_id=362"
+SRC_URI="http://download.tangent.org/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="2"
+KEYWORDS="amd64 ppc x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND=""
+
+APXS2_ARGS="-c ${PN}.c utility.c layout.c"
+
+APACHE2_MOD_CONF="15_mod_layout"
+APACHE2_MOD_DEFINE="LAYOUT"
+
+DOCFILES="README"
+
+need_apache2_2
diff --git a/www-apache/mod_ldap_userdir/Manifest b/www-apache/mod_ldap_userdir/Manifest
new file mode 100644
index 000000000000..6ee3747644fe
--- /dev/null
+++ b/www-apache/mod_ldap_userdir/Manifest
@@ -0,0 +1 @@
+DIST mod_ldap_userdir-1.1.19.tar.gz 51483 SHA256 467c3c9e40c1a8f39fe01ffedf5b9a462e14ed2a6ce2ec493c53f081b5a99fb5 SHA512 57d75ac58ac841641050e1f6e022bd6c7df9192da29439264bbe83e938e84a474952996e53bcba1f490ab24415c98b7e972bc3af14cb46a7bc35016b6533ff28 WHIRLPOOL b41afe88159e83316bed62011e0cb1f5430c3cd5b5026ac7418d2afd6f007d2299b9414490c9f3b8e37b9061fde82117aec8816e30e8abd1a79672cc88a01e2d
diff --git a/www-apache/mod_ldap_userdir/files/47_mod_ldap_userdir.conf b/www-apache/mod_ldap_userdir/files/47_mod_ldap_userdir.conf
new file mode 100644
index 000000000000..1e14e80e152b
--- /dev/null
+++ b/www-apache/mod_ldap_userdir/files/47_mod_ldap_userdir.conf
@@ -0,0 +1,9 @@
+<IfDefine LDAP_USERDIR>
+LoadModule ldap_userdir_module modules/mod_ldap_userdir.so
+
+LDAPUserDir public_html
+LDAPUserDirDNInfo cn=root,dc=yourcompany,dc=com yourpassword
+LDAPUserDirBaseDN ou=People,dc=yourcompany,dc=com
+</IfDefine>
+
+# vim: ts=4 filetype=apache
diff --git a/www-apache/mod_ldap_userdir/metadata.xml b/www-apache/mod_ldap_userdir/metadata.xml
new file mode 100644
index 000000000000..4538a68724a6
--- /dev/null
+++ b/www-apache/mod_ldap_userdir/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer><email>maintainer-needed@gentoo.org</email></maintainer>
+</pkgmetadata>
diff --git a/www-apache/mod_ldap_userdir/mod_ldap_userdir-1.1.19.ebuild b/www-apache/mod_ldap_userdir/mod_ldap_userdir-1.1.19.ebuild
new file mode 100644
index 000000000000..899d67f4aa20
--- /dev/null
+++ b/www-apache/mod_ldap_userdir/mod_ldap_userdir-1.1.19.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit apache-module depend.apache
+
+DESCRIPTION="Look up Apache ~user directories in an LDAP directory"
+HOMEPAGE="http://horde.net/~jwm/software/${PN}/"
+SRC_URI="http://horde.net/~jwm/software/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-1"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+IUSE="ssl"
+
+DEPEND="net-nds/openldap
+ ssl? ( dev-libs/openssl )"
+
+# The module will compile fine without apache[ldap], but Apache will
+# crash if you try to load ${PN} without mod_ldap loaded. The funny-
+# looking atom was taken from depend.apache.eclass (need_apache2).
+RDEPEND="${DEPEND}
+ =www-servers/apache-2*[ldap]"
+
+APACHE2_MOD_CONF="47_${PN}"
+APACHE2_MOD_DEFINE="LDAP LDAP_USERDIR"
+
+DOCFILES="DIRECTIVES README user-ldif"
+
+# Don't try to get away without this, even though it causes some deps to
+# be repeated.
+need_apache2
diff --git a/www-apache/mod_limitipconn/Manifest b/www-apache/mod_limitipconn/Manifest
new file mode 100644
index 000000000000..c281f9db0d4d
--- /dev/null
+++ b/www-apache/mod_limitipconn/Manifest
@@ -0,0 +1 @@
+DIST mod_limitipconn-0.24.tar.bz2 10150 SHA256 69ca8fbf99d4e02db75e129df07d1604db771e9c10c1b199e2accaa96aec2a1f SHA512 caf1337231ac83ef57938b0f89769afcf309a4a09a0a2c3fb171e49f038d42a5859dfdac06b2c7766f05d9431132b8752aa8ad5164794c89638eb90f392e827f WHIRLPOOL 740f0b2901099544f1fc03154ccec9ccac393501c1e5ffa8a3727a5f336cbceb54334174fb7f6b8e46cfdb8d49858b79d47fe6cc3ab056ff5c74826df77e0ad2
diff --git a/www-apache/mod_limitipconn/files/27_mod_limitipconn.conf b/www-apache/mod_limitipconn/files/27_mod_limitipconn.conf
new file mode 100644
index 000000000000..0c3f9d7ed4ae
--- /dev/null
+++ b/www-apache/mod_limitipconn/files/27_mod_limitipconn.conf
@@ -0,0 +1,20 @@
+<IfDefine LIMITIPCONN>
+LoadModule limitipconn_module modules/mod_limitipconn.so
+
+<Location /somewhere>
+ MaxConnPerIP 3
+ # exempting images from the connection limit is often a good
+ # idea if your web page has lots of inline images, since these
+ # pages often generate a flurry of concurrent image requests
+ NoIPLimit image/*
+</Location>
+
+<Location /mp3>
+ MaxConnPerIP 1
+ # In this case, all MIME types other than audio/mpeg and video*
+ # are exempt from the limit check
+ OnlyIPLimit audio/mpeg video
+</Location>
+</IfDefine>
+
+# vim: ts=4 filetype=apache
diff --git a/www-apache/mod_limitipconn/metadata.xml b/www-apache/mod_limitipconn/metadata.xml
new file mode 100644
index 000000000000..d8d06c3ff5ec
--- /dev/null
+++ b/www-apache/mod_limitipconn/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>tomk@gentoo.org</email>
+ <name>Tom Knight</name>
+ </maintainer>
+ <longdescription>
+ Apache module to limit the maximum number of simultaneous
+ connections per IP address. Allows inclusion and exclusion of files
+ based on MIME type.
+ </longdescription>
+</pkgmetadata>
diff --git a/www-apache/mod_limitipconn/mod_limitipconn-0.24.ebuild b/www-apache/mod_limitipconn/mod_limitipconn-0.24.ebuild
new file mode 100644
index 000000000000..c37edbc756c9
--- /dev/null
+++ b/www-apache/mod_limitipconn/mod_limitipconn-0.24.ebuild
@@ -0,0 +1,26 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit apache-module
+
+DESCRIPTION="Allows administrators to limit the number of simultaneous downloads permitted"
+HOMEPAGE="http://dominia.org/djao/limitipconn2.html"
+SRC_URI="http://dominia.org/djao/limit/${P}.tar.bz2"
+
+LICENSE="Apache-2.0"
+SLOT="2"
+KEYWORDS="amd64 ppc x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND=""
+
+RESTRICT="test"
+
+APACHE2_MOD_CONF="27_${PN}"
+APACHE2_MOD_DEFINE="LIMITIPCONN INFO"
+
+DOCFILES="ChangeLog README"
+
+need_apache2
diff --git a/www-apache/mod_loadavg/Manifest b/www-apache/mod_loadavg/Manifest
new file mode 100644
index 000000000000..f6c290d03391
--- /dev/null
+++ b/www-apache/mod_loadavg/Manifest
@@ -0,0 +1 @@
+DIST mod_loadavg-0.0.1.c 10516 SHA256 025df5362b49998577575b384fd20444239d9ec72843e54a918da9d6b37aba3b SHA512 83396467b7cd21d512d84621fdb17a451309e218a984e9061af5c1615e0691ca73403124c89d1c4fba5d9631c8b2855597165c1864bf707bfe898caaf845a7d7 WHIRLPOOL 4afba40c96f0c0cdb3fccc3436a2dfd3f5e0a7bde32233d2fd6b3454af0d3f9fabca00ad0e505879866fa2405471d927ca4c52e3cc0a71bda25663b036e877e7
diff --git a/www-apache/mod_loadavg/files/10_mod_loadavg.conf b/www-apache/mod_loadavg/files/10_mod_loadavg.conf
new file mode 100644
index 000000000000..5991656cbefc
--- /dev/null
+++ b/www-apache/mod_loadavg/files/10_mod_loadavg.conf
@@ -0,0 +1,18 @@
+<IfDefine LOADAVG>
+LoadModule loadavg_module modules/mod_loadavg.so
+
+# Set mod_loadavg on
+#ModLoadavg On
+
+# Set maximum value for the load average of the last minute
+# Default: 4.0
+#Loadavg1 4.0
+
+# Set maximum value for the load average of the last 5 minutes
+#Loadavg5 4.0
+
+# Set maximum value for the load average of the last 15 minutes
+#Loadavg15 4.0
+</IfDefine>
+
+# vim: ts=4 filetype=apache
diff --git a/www-apache/mod_loadavg/metadata.xml b/www-apache/mod_loadavg/metadata.xml
new file mode 100644
index 000000000000..4538a68724a6
--- /dev/null
+++ b/www-apache/mod_loadavg/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer><email>maintainer-needed@gentoo.org</email></maintainer>
+</pkgmetadata>
diff --git a/www-apache/mod_loadavg/mod_loadavg-0.0.1.ebuild b/www-apache/mod_loadavg/mod_loadavg-0.0.1.ebuild
new file mode 100644
index 000000000000..568fe0fcde3c
--- /dev/null
+++ b/www-apache/mod_loadavg/mod_loadavg-0.0.1.ebuild
@@ -0,0 +1,27 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit apache-module eutils
+
+KEYWORDS="~amd64 ~x86"
+
+DESCRIPTION="Apache module executing CGI-Requests depending on the load of the server"
+HOMEPAGE="http://defunced.de/"
+SRC_URI="mirror://gentoo/${P}.c"
+LICENSE="Apache-1.1"
+SLOT="0"
+IUSE=""
+
+DEPEND=""
+RDEPEND=""
+
+APACHE2_MOD_CONF="10_${PN}"
+APACHE2_MOD_DEFINE="LOADAVG"
+
+need_apache2_2
+
+src_unpack() {
+ mkdir -p "${S}" || die "mkdir S failed"
+ cp -f "${DISTDIR}/${P}.c" "${S}/${PN}.c" || die "source copy failed"
+}
diff --git a/www-apache/mod_log_rotate/Manifest b/www-apache/mod_log_rotate/Manifest
new file mode 100644
index 000000000000..5a2b15447e68
--- /dev/null
+++ b/www-apache/mod_log_rotate/Manifest
@@ -0,0 +1,2 @@
+DIST mod_log_rotate-1.00.tar.bz2 4697 SHA256 8a46b9ebecee09ff3dc240dcc28f153b66135764b80e374de60a0a4f1301eb5a SHA512 dbfa1399f70333e6d53cee039ba9c81a213b485a8a6824976983ebc85b2c856061dbbc13fa899b5e98912c519c9fb37009bf2fbf8b6a9f46cca65c0e3bd1595e WHIRLPOOL 257b7d189e045913e31cea822bd137eaab3b052fb1b196a8b4057c02466c9fb55a3ed1929c5230d18a7d75f710f19691132b3062caf4f2ca0c4057e82be11be0
+DIST mod_log_rotate-1.01.tar.gz 9772 SHA256 c87465630591b938b2263abc566354befd263aea31ad045752a006de57584432 SHA512 7da606ae8ce5e0f2ade16fdffffc57fa9549b4b5e9529eb3149ff7390caa64f7ec065aa7416b5c8ab751e2b3eaf35cf79c96b8c7e68e1165a46851547781c076 WHIRLPOOL cfdd957f86f964b2c6dc0deb3c838d67a899d8e7ce6c4a9421930c77a6cbd2755aa4903acae371b3a36bada6dccdbdd876a41dc369610cadca04ff5ed875d7f6
diff --git a/www-apache/mod_log_rotate/files/10_mod_log_rotate.conf b/www-apache/mod_log_rotate/files/10_mod_log_rotate.conf
new file mode 100644
index 000000000000..eb17b4622ff1
--- /dev/null
+++ b/www-apache/mod_log_rotate/files/10_mod_log_rotate.conf
@@ -0,0 +1,6 @@
+<IfDefine LOG_ROTATE>
+LoadModule log_rotate_module modules/mod_log_rotate.so
+RotateLogs On
+</IfDefine>
+
+# vim: ts=4 filetype=apache
diff --git a/www-apache/mod_log_rotate/metadata.xml b/www-apache/mod_log_rotate/metadata.xml
new file mode 100644
index 000000000000..5c72380f8f41
--- /dev/null
+++ b/www-apache/mod_log_rotate/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>maintainer-needed@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">JBlond/mod_log_rotate</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/www-apache/mod_log_rotate/mod_log_rotate-1.00.ebuild b/www-apache/mod_log_rotate/mod_log_rotate-1.00.ebuild
new file mode 100644
index 000000000000..fb2b552b91b6
--- /dev/null
+++ b/www-apache/mod_log_rotate/mod_log_rotate-1.00.ebuild
@@ -0,0 +1,22 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils apache-module
+
+DESCRIPTION="mod_log_rotate adds log rotation support to mod_log_config based on strftime(3)"
+HOMEPAGE="http://www.hexten.net/wiki/index.php/Mod-log-rotate"
+SRC_URI="mirror://gentoo/${P}.tar.bz2"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND=""
+
+APACHE2_MOD_CONF="10_${PN}"
+APACHE2_MOD_DEFINE="LOG_ROTATE"
+
+need_apache2
diff --git a/www-apache/mod_log_rotate/mod_log_rotate-1.01.ebuild b/www-apache/mod_log_rotate/mod_log_rotate-1.01.ebuild
new file mode 100644
index 000000000000..dcf3bf05da58
--- /dev/null
+++ b/www-apache/mod_log_rotate/mod_log_rotate-1.01.ebuild
@@ -0,0 +1,25 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit apache-module
+
+DESCRIPTION="Log rotation support for mod_log_config based on strftime(3)"
+HOMEPAGE="https://github.com/JBlond/${PN}"
+SRC_URI="https://github.com/JBlond/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND=""
+
+APACHE2_MOD_CONF="10_${PN}"
+APACHE2_MOD_DEFINE="LOG_ROTATE"
+DOCFILES="README.md"
+
+need_apache2
diff --git a/www-apache/mod_log_sql/Manifest b/www-apache/mod_log_sql/Manifest
new file mode 100644
index 000000000000..93d9e9c07628
--- /dev/null
+++ b/www-apache/mod_log_sql/Manifest
@@ -0,0 +1 @@
+DIST mod_log_sql-1.101.tar.bz2 127500 SHA256 0907579b0466844f7f1886af92a9ea36b4815ec869929ba577c74d32b6d69a5e SHA512 30ea586443cf042e52149012613d80ca0c6631847618366905e90f99bfab235ca6e050fa1dbdb98ef54be6d68b34564781c6efb36ba89f7b51e4f3e00892d91f WHIRLPOOL 1fb6c8725a6321fe565a13121592694750354686e6a3035abb80bc7250d3a2884dd0bea0421f2d02768c196eeb409cb7e600e48dfed0fd7f14146d242666d681
diff --git a/www-apache/mod_log_sql/files/1.101/42_mod_log_sql.conf b/www-apache/mod_log_sql/files/1.101/42_mod_log_sql.conf
new file mode 100644
index 000000000000..57bd78d34ae4
--- /dev/null
+++ b/www-apache/mod_log_sql/files/1.101/42_mod_log_sql.conf
@@ -0,0 +1,33 @@
+<IfDefine LOG_SQL>
+LoadModule log_sql_module modules/mod_log_sql.so
+LoadModule log_sql_logio_module modules/mod_log_sql_logio.so
+
+<IfDefine DBI>
+LoadModule log_sql_dbi_module modules/mod_log_sql_dbi.so
+</IfDefine>
+
+<IfDefine !DBI>
+LoadModule log_sql_mysql_module modules/mod_log_sql_mysql.so
+</IfDefine>
+
+<IfDefine SSL>
+LoadModule log_sql_ssl_module modules/mod_log_sql_ssl.so
+</IfDefine>
+
+LogSQLLoginInfo mysql://user:passwd@host/database
+LogSQLDBParam socketfile /var/run/mysqld/mysqld.sock
+
+# LogSQLMassVirtualHosting automatically sets LogSQLCreateTables to 'on'
+#LogSQLCreateTables on
+LogSQLMassVirtualHosting on
+
+LogSQLMachineID machine_id
+LogSQLPreserveFile logs/mod_log_sql_preserve.sql
+
+# See http://www.outoforder.cc/projects/apache/mod_log_sql/docs-2.0/
+# for details about LogSQLTransferLogFormat
+# be compatible with the Combined Log Format (CLF)
+LogSQLTransferLogFormat AbHhmRSsTUuv
+</IfDefine>
+
+# vim: ts=4 filetype=apache
diff --git a/www-apache/mod_log_sql/files/42_mod_log_sql.conf b/www-apache/mod_log_sql/files/42_mod_log_sql.conf
new file mode 100644
index 000000000000..d5ae3813fc56
--- /dev/null
+++ b/www-apache/mod_log_sql/files/42_mod_log_sql.conf
@@ -0,0 +1,28 @@
+<IfDefine LOG_SQL>
+LoadModule log_sql_module modules/mod_log_sql.so
+LoadModule log_sql_mysql_module modules/mod_log_sql_mysql.so
+
+<IfDefine SSL>
+LoadModule log_sql_ssl_module modules/mod_log_sql_ssl.so
+</IfDefine>
+
+LogSQLLoginInfo mysql://user:passwd@host/database
+LogSQLDBParam socketfile /var/run/mysqld/mysqld.sock
+
+# LogSQLMassVirtualHosting automatically sets LogSQLCreateTables to 'on'
+#LogSQLCreateTables on
+LogSQLMassVirtualHosting on
+
+LogSQLMachineID machine_id
+LogSQLPreserveFile logs/mod_log_sql_preserve.sql
+
+# See http://www.outoforder.cc/projects/apache/mod_log_sql/docs-2.0/
+# for details about LogSQLTransferLogFormat
+# be compatible with the Combined Log Format (CLF)
+LogSQLTransferLogFormat AbHhmRSsTUuv
+<IfDefine SSL>
+LogSQLTransferLogFormat AbHhmRSsTUuv
+</IfDefine>
+</IfDefine>
+
+# vim: ts=4 filetype=apache
diff --git a/www-apache/mod_log_sql/files/mod_log_sql-1.101-apache-2.4.patch b/www-apache/mod_log_sql/files/mod_log_sql-1.101-apache-2.4.patch
new file mode 100644
index 000000000000..afbaf3927b7d
--- /dev/null
+++ b/www-apache/mod_log_sql/files/mod_log_sql-1.101-apache-2.4.patch
@@ -0,0 +1,17 @@
+Description: Fixes compatibility with Apache 2.4 API
+Author: Thomas Goirand <zigo@debian.org>
+Bug-Debian: http://bugs.debian.org/666797
+Forwarded: http://lists.outoforder.cc/pipermail/mod_log_sql/2012-April/000358.html
+Last-Update: 2013-07-10
+
+--- libapache-mod-log-sql-1.100.orig/functions.h
++++ libapache-mod-log-sql-1.100/functions.h
+@@ -14,7 +14,7 @@ static const char *extract_remote_addres
+
+ static const char *extract_remote_address(request_rec *r, char *a)
+ {
+- return r->connection->remote_ip;
++ return r->useragent_ip;
+ }
+
+ static const char *extract_local_address(request_rec *r, char *a) __attribute__((unused));
diff --git a/www-apache/mod_log_sql/metadata.xml b/www-apache/mod_log_sql/metadata.xml
new file mode 100644
index 000000000000..4538a68724a6
--- /dev/null
+++ b/www-apache/mod_log_sql/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer><email>maintainer-needed@gentoo.org</email></maintainer>
+</pkgmetadata>
diff --git a/www-apache/mod_log_sql/mod_log_sql-1.101-r1.ebuild b/www-apache/mod_log_sql/mod_log_sql-1.101-r1.ebuild
new file mode 100644
index 000000000000..c92c273a492f
--- /dev/null
+++ b/www-apache/mod_log_sql/mod_log_sql-1.101-r1.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit apache-module
+
+DESCRIPTION="An Apache module for logging to an SQL (MySQL) database"
+HOMEPAGE="http://www.outoforder.cc/projects/apache/mod_log_sql/"
+SRC_URI="http://www.outoforder.cc/downloads/${PN}/${P}.tar.bz2"
+
+LICENSE="Artistic"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+IUSE="dbi ssl"
+
+DEPEND="virtual/mysql
+ dbi? ( dev-db/libdbi )
+ ssl? ( dev-libs/openssl )"
+RDEPEND="${DEPEND}"
+
+APACHE2_MOD_CONF="1.101/42_${PN}"
+APACHE2_MOD_DEFINE="LOG_SQL"
+
+APACHE2_EXECFILES="
+ .libs/${PN}_dbi.so
+ .libs/${PN}_logio.so
+ .libs/${PN}_mysql.so
+ .libs/${PN}_ssl.so"
+
+DOCFILES="AUTHORS CHANGELOG docs/README docs/manual.html \
+contrib/create_tables.sql contrib/make_combined_log.pl contrib/mysql_import_combined_log.pl"
+
+need_apache2_2
+
+src_compile() {
+ local myconf="--with-apxs=${APXS}"
+ use ssl && myconf="${myconf} --with-ssl-inc=/usr"
+ use ssl || myconf="${myconf} --without-ssl-inc"
+ use dbi && myconf="${myconf} --with-dbi=/usr"
+ use dbi || myconf="${myconf} --without-dbi"
+ econf ${myconf} || die "econf failed"
+ emake || die "emake failed"
+}
+
+pkg_postinst() {
+ use dbi && APACHE2_MOD_DEFINE="${APACHE2_MOD_DEFINE} DBI"
+ apache-module_pkg_postinst
+ einfo "Refer to /usr/share/doc/${PF}/ for scripts"
+ einfo "on how to create logging tables."
+}
diff --git a/www-apache/mod_log_sql/mod_log_sql-1.101-r2.ebuild b/www-apache/mod_log_sql/mod_log_sql-1.101-r2.ebuild
new file mode 100644
index 000000000000..9d541c117bc7
--- /dev/null
+++ b/www-apache/mod_log_sql/mod_log_sql-1.101-r2.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit apache-module eutils
+
+DESCRIPTION="An Apache module for logging to an SQL (MySQL) database"
+HOMEPAGE="http://www.outoforder.cc/projects/apache/mod_log_sql/"
+SRC_URI="http://www.outoforder.cc/downloads/${PN}/${P}.tar.bz2"
+
+LICENSE="Artistic"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="dbi ssl"
+
+DEPEND="virtual/mysql
+ dbi? ( dev-db/libdbi )
+ ssl? ( dev-libs/openssl:0 )"
+RDEPEND="${DEPEND}"
+
+APACHE2_MOD_CONF="1.101/42_${PN}"
+APACHE2_MOD_DEFINE="LOG_SQL"
+
+APACHE2_EXECFILES="
+ .libs/${PN}_logio.so
+ .libs/${PN}_mysql.so
+ .libs/${PN}_ssl.so"
+
+DOCFILES="AUTHORS CHANGELOG docs/README docs/manual.html \
+contrib/create_tables.sql contrib/make_combined_log.pl contrib/mysql_import_combined_log.pl"
+
+need_apache2_4
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-apache-2.4.patch
+}
+
+src_configure() {
+ local myconf="--with-apxs=${APXS}"
+ use ssl && myconf="${myconf} --with-ssl-inc=/usr"
+ use ssl || myconf="${myconf} --without-ssl-inc"
+ use dbi && myconf="${myconf} --with-dbi=/usr"
+ use dbi || myconf="${myconf} --without-dbi"
+ econf ${myconf}
+}
+
+src_compile() {
+ emake
+}
+
+src_install() {
+ use dbi && APACHE2_EXECFILES="${APACHE2_EXECFILES} .libs/${PN}_dbi.so"
+ apache-module_src_install
+}
+
+pkg_postinst() {
+ use dbi && APACHE2_MOD_DEFINE="${APACHE2_MOD_DEFINE} DBI"
+ apache-module_pkg_postinst
+ einfo "Refer to /usr/share/doc/${PF}/ for scripts"
+ einfo "on how to create logging tables."
+}
diff --git a/www-apache/mod_macro/Manifest b/www-apache/mod_macro/Manifest
new file mode 100644
index 000000000000..3b31c3d6ae37
--- /dev/null
+++ b/www-apache/mod_macro/Manifest
@@ -0,0 +1,2 @@
+DIST mod_macro-1.1.10.tar.bz2 13517 SHA256 9ce558d0b182a721a04e5b499ba2684d07c5ba2c7a552d8a844489beb9e339d0
+DIST mod_macro-1.2.1.tar.gz 16870 SHA256 f22c6342b36526fb401dea4dba4c2b61a72083da973b9ca1c4777a77d5128fc3
diff --git a/www-apache/mod_macro/files/00_example.conf b/www-apache/mod_macro/files/00_example.conf
new file mode 100644
index 000000000000..5b60e92ca830
--- /dev/null
+++ b/www-apache/mod_macro/files/00_example.conf
@@ -0,0 +1,26 @@
+# Definition of a MyVirtualHost Macro.
+<Macro MyVirtualHost $host $port $dir>
+ Listen $port
+
+ <VirtualHost $host:$port>
+ DocumentRoot $dir
+
+ <Directory $dir>
+ # do something here...
+ </Directory>
+
+ # limit access to intranet subdir.
+ <Directory $dir/intranet>
+ order deny,allow
+ deny from all
+ allow from 10.0.0.0/8
+ </Directory>
+ </VirtualHost>
+</Macro>
+
+# Use of MyVirtualHost with different arguments.
+#Use MyVirtualHost www.apache.org 80 /projects/apache/web
+#Use MyVirtualHost www.perl.com 8080 /projects/perl/web
+#Use MyVirtualHost www.ensmp.fr 1234 /projects/mines/web
+
+# vim: ts=4 filetype=apache
diff --git a/www-apache/mod_macro/files/27_mod_macro.conf b/www-apache/mod_macro/files/27_mod_macro.conf
new file mode 100644
index 000000000000..67ce8e4d2688
--- /dev/null
+++ b/www-apache/mod_macro/files/27_mod_macro.conf
@@ -0,0 +1,6 @@
+<IfDefine MACRO>
+LoadModule macro_module modules/mod_macro.so
+Include /etc/apache2/macros.d/*.conf
+</IfDefine>
+
+# vim: ts=4 filetype=apache
diff --git a/www-apache/mod_macro/metadata.xml b/www-apache/mod_macro/metadata.xml
new file mode 100644
index 000000000000..4538a68724a6
--- /dev/null
+++ b/www-apache/mod_macro/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer><email>maintainer-needed@gentoo.org</email></maintainer>
+</pkgmetadata>
diff --git a/www-apache/mod_macro/mod_macro-1.1.10.ebuild b/www-apache/mod_macro/mod_macro-1.1.10.ebuild
new file mode 100644
index 000000000000..2af2351c0e13
--- /dev/null
+++ b/www-apache/mod_macro/mod_macro-1.1.10.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit apache-module
+
+DESCRIPTION="An Apache2 module providing macros for the Apache config file"
+HOMEPAGE="http://www.coelho.net/mod_macro/"
+SRC_URI="http://www.coelho.net/${PN}/${P}.tar.bz2"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND=""
+
+APACHE2_MOD_CONF="27_${PN}"
+APACHE2_MOD_DEFINE="MACRO"
+
+DOCFILES="CHANGES INSTALL README mod_macro.html"
+
+need_apache2_2
+
+src_install() {
+ apache-module_src_install
+ keepdir "${APACHE_CONFDIR}"/macros.d/
+ insinto "${APACHE_CONFDIR}"/macros.d/
+ doins "${FILESDIR}"/00_example.conf
+}
diff --git a/www-apache/mod_macro/mod_macro-1.2.1.ebuild b/www-apache/mod_macro/mod_macro-1.2.1.ebuild
new file mode 100644
index 000000000000..161663d04e13
--- /dev/null
+++ b/www-apache/mod_macro/mod_macro-1.2.1.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit apache-module
+
+DESCRIPTION="An Apache2 module providing macros for the Apache config file"
+HOMEPAGE="http://www.coelho.net/mod_macro/"
+#SRC_URI="http://www.coelho.net/${PN}/${P}.tar.bz2"
+SRC_URI="http://people.apache.org/~fabien/${PN}/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="sys-devel/libtool"
+RDEPEND=""
+
+APACHE2_MOD_CONF="27_${PN}"
+APACHE2_MOD_DEFINE="MACRO"
+
+DOCFILES="CHANGES INSTALL README mod_macro.html"
+
+need_apache2_4
+
+src_install() {
+ apache-module_src_install
+ keepdir "${APACHE_CONFDIR}"/macros.d/
+ insinto "${APACHE_CONFDIR}"/macros.d/
+ doins "${FILESDIR}"/00_example.conf
+}
diff --git a/www-apache/mod_mono/Manifest b/www-apache/mod_mono/Manifest
new file mode 100644
index 000000000000..39c7ef2997da
--- /dev/null
+++ b/www-apache/mod_mono/Manifest
@@ -0,0 +1 @@
+DIST mod_mono-2.10.tar.bz2 259321 SHA256 a8ba3a8785f2deb13b4c0b1dedb4aa9405077309c9c42d99694cedfcc0f9e3f7 SHA512 b0cb9e8125f2ae124c6c2de259afa04ccb194fb45f7b3968f5cce85df25a8d505a49313429b2ce7fef51d02586ce1af8a7e1e47d2750b4dc478600ba86ea77de WHIRLPOOL 87db32cfe8590c454bde57a9dd4a79c6b22a4b84cadb3ae2e467fd2aa6491dbd8313b5cb5982410c430401aa1668e789979924f3fd1fbe585723b8b2331f353a
diff --git a/www-apache/mod_mono/files/2.2/70_mod_mono.conf b/www-apache/mod_mono/files/2.2/70_mod_mono.conf
new file mode 100644
index 000000000000..f944039923e9
--- /dev/null
+++ b/www-apache/mod_mono/files/2.2/70_mod_mono.conf
@@ -0,0 +1,88 @@
+# For more information on the Mono* directives, see the man page for
+# mod_mono(8)
+
+<IfDefine MONO>
+ # Set this to False if you manage your ASP.Net server manually through
+ # /etc/init.d/mod-mono-server
+ MonoRunXSP True
+
+ # Set this to Enabled if you want to enable AutoHosting.
+ # See http://www.mono-project.com/AutoConfiguration for more info.
+ # Note that if you want your automatically hosted applications
+ # handled by ASP.NET 2.0 engine you have to enable the aspnet2 USE flag.
+ MonoAutoApplication Enabled
+
+ <IfModule !mod_mono.c>
+ LoadModule mono_module /usr/@LIBDIR@/apache2/modules/mod_mono.so
+ </IfModule>
+
+ <IfModule mod_mime.c>
+ AddType application/x-asp-net .aspx
+ AddType application/x-asp-net .asmx
+ AddType application/x-asp-net .ashx
+ AddType application/x-asp-net .asax
+ AddType application/x-asp-net .ascx
+ AddType application/x-asp-net .soap
+ AddType application/x-asp-net .rem
+ AddType application/x-asp-net .axd
+ AddType application/x-asp-net .cs
+ AddType application/x-asp-net .vb
+ AddType application/x-asp-net .master
+ AddType application/x-asp-net .sitemap
+ AddType application/x-asp-net .resources
+ AddType application/x-asp-net .skin
+ AddType application/x-asp-net .browser
+ AddType application/x-asp-net .webinfo
+ AddType application/x-asp-net .resx
+ AddType application/x-asp-net .licx
+ AddType application/x-asp-net .csproj
+ AddType application/x-asp-net .vbproj
+ AddType application/x-asp-net .config
+ AddType application/x-asp-net .Config
+ AddType application/x-asp-net .dll
+ DirectoryIndex index.aspx
+ DirectoryIndex Default.aspx
+ DirectoryIndex default.aspx
+ </IfModule>
+
+### Please also add "-D MONO_DEMO" in order to activate out-of-the-box mono demo
+###
+
+ # Note that the test application runs on a separate mod-mono-server
+ # instance named "testinst". Athought this is not mandatory, it shows how to
+ # distribute workload between multiple mod-mono-servers. For more info see:
+ # http://www.mono-project.com/Mod_mono
+
+ <IfDefine MONO_DEMO>
+ <IfModule mod_alias.c>
+ Alias /mono "/usr/lib/xsp/test"
+ </IfModule>
+
+ # You might want to specify the version of mod-mono-server
+ # instance that will handle your application. The default
+ # value depends on whether the aspnet2 USE flag was set
+ # during compilation
+ #MonoServerPath testinst /usr/lib/mono/1.0/mod-mono-server.exe
+ #MonoServerPath testinst /usr/lib/mono/2.0/mod-mono-server2.exe
+
+ AddMonoApplications testinst "/mono:/usr/lib/xsp/test"
+
+ <Directory /usr/lib/xsp/test>
+ SetHandler mono
+ MonoSetServerAlias testinst
+
+ <IfModule mod_authz_host.c>
+ Order allow,deny
+ Allow from all
+ </IfModule>
+ <IfModule mod_dir.c>
+ # Sample ASP.NET 1.1/2.0 applications can be accessed
+ # via index2.aspx.
+ DirectoryIndex index.aspx
+ #DirectoryIndex index2.aspx
+ </IfModule>
+ </Directory>
+ </IfDefine>
+### MONO_DEMO end.
+
+</IfDefine>
diff --git a/www-apache/mod_mono/files/mod_mono-2.10-apache-2.4.patch b/www-apache/mod_mono/files/mod_mono-2.10-apache-2.4.patch
new file mode 100644
index 000000000000..86694bfabcc0
--- /dev/null
+++ b/www-apache/mod_mono/files/mod_mono-2.10-apache-2.4.patch
@@ -0,0 +1,146 @@
+Sólo en mod_mono-2.10.new/: attachment.cgi?id=402888
+diff -ur mod_mono-2.10/configure.in mod_mono-2.10.new/configure.in
+--- mod_mono-2.10/configure.in 2011-01-13 23:32:35.000000000 +0100
++++ mod_mono-2.10.new/configure.in 2015-06-07 21:09:26.417127319 +0200
+@@ -336,6 +336,16 @@
+ ], [
+ ])
+
++AC_TRY_RUN([
++ #include <ap_release.h>
++ int main ()
++ {
++ return (AP_SERVER_MAJORVERSION_NUMBER == 2 && AP_SERVER_MINORVERSION_NUMBER == 4) ? 0 : 1;
++ }
++], [
++ APACHE_VER=2.4
++], [
++])
+ fi
+
+ if test ! "$APACHE_VER" = "1.3" -a ! "$APACHE_VER" = "retry" ; then
+@@ -385,6 +395,10 @@
+ AC_DEFINE([APACHE22],,[Compiling for Apache >= 2.2 ])
+ fi
+
++if test "$APACHE_VER" = "2.4" ; then
++ AC_DEFINE([APACHE24],,[Compiling for Apache >= 2.4 ])
++fi
++
+ # check for --with-mono-default-config-dir
+ DFLT_MONO_CONFIG_DIR=`$APXS -q SYSCONFDIR`/mod-mono-applications
+ AC_ARG_WITH(mono-default-config-dir,
+diff -ur mod_mono-2.10/src/mod_mono.c mod_mono-2.10.new/src/mod_mono.c
+--- mod_mono-2.10/src/mod_mono.c 2011-01-13 23:32:35.000000000 +0100
++++ mod_mono-2.10.new/src/mod_mono.c 2015-06-07 21:09:26.421127351 +0200
+@@ -386,7 +386,11 @@
+ apache_get_userid ()
+ {
+ #ifdef HAVE_UNIXD
+- return unixd_config.user_id;
++#if defined(APACHE24)
++ return ap_unixd_config.user_id;
++#else
++ return unixd_config.user_id;
++#endif
+ #else
+ return ap_user_id;
+ #endif
+@@ -396,7 +400,11 @@
+ apache_get_groupid ()
+ {
+ #ifdef HAVE_UNIXD
+- return unixd_config.group_id;
++#if defined(APACHE24)
++ return ap_unixd_config.user_id;
++#else
++ return unixd_config.user_id;
++#endif
+ #else
+ return ap_group_id;
+ #endif
+@@ -406,7 +414,11 @@
+ apache_get_username ()
+ {
+ #ifdef HAVE_UNIXD
++#if defined(APACHE24)
++ return ap_unixd_config.user_name;
++#else
+ return unixd_config.user_name;
++#endif
+ #else
+ return ap_user_name;
+ #endif
+@@ -485,8 +497,12 @@
+
+ #if defined (AP_NEED_SET_MUTEX_PERMS) && defined (HAVE_UNIXD)
+ DEBUG_PRINT (1, "Setting mutex permissions for %s", xsp->dashboard_lock_file);
++#if defined(APACHE24)
++ rv = ap_unixd_set_global_mutex_perms (xsp->dashboard_mutex);
++#else
+ rv = unixd_set_global_mutex_perms (xsp->dashboard_mutex);
+- if (rv != APR_SUCCESS) {
++#endif
++ if (rv != APR_SUCCESS) {
+ ap_log_error (APLOG_MARK, APLOG_CRIT, STATCODE_AND_SERVER (rv),
+ "Failed to set mutex permissions for %s",
+ xsp->dashboard_lock_file);
+@@ -850,10 +866,14 @@
+ #if defined(APACHE22)
+ return c->remote_addr->port;
+ #else
++#if defined(APACHE24)
++ return c->client_addr->port;
++#else
+ apr_port_t port;
+ apr_sockaddr_port_get (&port, c->remote_addr);
+ return port;
+ #endif
++#endif
+
+ }
+
+@@ -863,10 +883,14 @@
+ #if defined(APACHE22)
+ return r->connection->local_addr->port;
+ #else
++#if defined(APACHE24)
++ return r->connection->local_addr->port;
++#else
+ apr_port_t port;
+ apr_sockaddr_port_get (&port, r->connection->local_addr);
+ return port;
+ #endif
++#endif
+ }
+
+ static const char *
+@@ -1977,9 +2001,12 @@
+ size += info.local_ip_len + sizeof (int32_t);
+
+ size += sizeof (int32_t);
+-
+- info.remote_ip_len = strlen (r->connection->remote_ip);
+- size += info.remote_ip_len + sizeof (int32_t);
++#if defined(APACHE24)
++ info.remote_ip_len = strlen (r->connection->client_ip);
++#else
++ info.remote_ip_len = strlen (r->connection->remote_ip);
++#endif
++ size += info.remote_ip_len + sizeof (int32_t);
+
+ size += sizeof (int32_t);
+
+@@ -2026,7 +2053,11 @@
+ i = LE_FROM_INT (i);
+ memcpy (ptr, &i, sizeof (i));
+ ptr += sizeof (int32_t);
++#if defined(APACHE24)
++ ptr += write_string_to_buffer (ptr, 0, r->connection->client_ip, info.remote_ip_len);
++#else
+ ptr += write_string_to_buffer (ptr, 0, r->connection->remote_ip, info.remote_ip_len);
++#endif
+ i = connection_get_remote_port (r->connection);
+ i = LE_FROM_INT (i);
+ memcpy (ptr, &i, sizeof (i));
+Sólo en mod_mono-2.10.new/src: mod_mono.c.orig
diff --git a/www-apache/mod_mono/metadata.xml b/www-apache/mod_mono/metadata.xml
new file mode 100644
index 000000000000..1123c4994f60
--- /dev/null
+++ b/www-apache/mod_mono/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>dotnet</herd>
+ <longdescription lang="en">
+ The module allows Apache (http://httpd.apache.org) to serve ASP.NET
+ pages by proxying the requests to a slightly modified version of our XSP
+ called mod-mono-server that is installed along with XSP.
+ </longdescription>
+</pkgmetadata>
diff --git a/www-apache/mod_mono/mod_mono-2.10.ebuild b/www-apache/mod_mono/mod_mono-2.10.ebuild
new file mode 100644
index 000000000000..a6285fd14f87
--- /dev/null
+++ b/www-apache/mod_mono/mod_mono-2.10.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+# Watch the order of these!
+inherit autotools apache-module multilib eutils go-mono mono
+
+KEYWORDS="amd64 ppc x86"
+
+DESCRIPTION="Apache module for Mono"
+HOMEPAGE="http://www.mono-project.com/Mod_mono"
+LICENSE="Apache-2.0"
+SLOT="0"
+IUSE="debug"
+
+DEPEND="=dev-dotnet/xsp-${GO_MONO_REL_PV}*"
+RDEPEND="${DEPEND}"
+
+APACHE2_MOD_CONF="2.2/70_${PN}"
+APACHE2_MOD_DEFINE="MONO"
+
+DOCFILES="AUTHORS ChangeLog COPYING INSTALL NEWS README"
+
+need_apache2
+
+src_prepare() {
+ sed -e "s:@LIBDIR@:$(get_libdir):" "${FILESDIR}/${APACHE2_MOD_CONF}.conf" \
+ > "${WORKDIR}/${APACHE2_MOD_CONF##*/}.conf" || die
+
+ epatch "${FILESDIR}"/${PN}-2.10-apache-2.4.patch
+
+ eautoreconf
+ go-mono_src_prepare
+}
+
+src_configure() {
+ export LIBS="$(pkg-config --libs apr-1)"
+ go-mono_src_configure \
+ $(use_enable debug) \
+ --with-apxs="${APXS}" \
+ --with-apr-config="/usr/bin/apr-1-config" \
+ --with-apu-config="/usr/bin/apu-1-config"
+}
+src_compile() {
+ go-mono_src_compile
+}
+
+src_install() {
+ go-mono_src_install
+ find "${D}" -name 'mod_mono.conf' -delete || die "failed to remove mod_mono.conf"
+ insinto "${APACHE_MODULES_CONFDIR}"
+ newins "${WORKDIR}/${APACHE2_MOD_CONF##*/}.conf" "${APACHE2_MOD_CONF##*/}.conf" \
+ || die "internal ebuild error: '${FILESDIR}/${APACHE2_MOD_CONF}.conf' not found"
+}
+
+pkg_postinst() {
+ apache-module_pkg_postinst
+
+ elog "To enable mod_mono, add \"-D MONO\" to your Apache's"
+ elog "conf.d configuration file. Additionally, to view sample"
+ elog "ASP.NET applications, add \"-D MONO_DEMO\" too."
+}
diff --git a/www-apache/mod_musicindex/Manifest b/www-apache/mod_musicindex/Manifest
new file mode 100644
index 000000000000..ca4b68a543be
--- /dev/null
+++ b/www-apache/mod_musicindex/Manifest
@@ -0,0 +1,4 @@
+DIST mod_musicindex-1.4.1.tar.gz 508795 SHA256 0fb052ebb8fa511467fd21696d798dee35b2e611955572cf746e9712e531a596 SHA512 2d3acfcf319070dd5352db66b14766498189e9d0790596c4c712b7564f9221cf058ca38fa118f18ec358c2d7c37d695d61f9d43d91bf83fa9582d834f06fbfea WHIRLPOOL 0969ca9d4ebc1b16d6581bc8af851d152a565bfc0cb412a580e8c40f6c9794e2c428731f8d091708396ae8a9b3fe658dcd4c0c98041d02879737e58885d8e0e4
+DIST mod_musicindex-1.4.1_valid-rss.png 1523 SHA256 736dfb61c58977af6766eeeeaf061696c5f035864773f66bdd495da1bc841f78 SHA512 e9df8ea0c6da2d1f268f8aa17e396dcdf53a61d1196ed67f44f03f22f0c5a9661a1e8a96f6d506c02374bc4f0923be9371372a2c678b705017ee733be2b402ec WHIRLPOOL 39b162b7b5914a9e6957b4c30bcfa9cbdbbdd9ca03859ebebee0174999b1f7d37ccc72ad265ca1f429abbb991e39e961de36d1889dfd2e2510a55907db5fbe1d
+DIST mod_musicindex-1.4.1_valid-xhtml11 1842 SHA256 52ae8eb2852754b330097997e243cb98d6c2982a6d707d62c707bed34cc7200b SHA512 8beb13a595b402e7de416ae05992f3e0a17719554fbc83cd5c3e0518cd859c560339a61c2f198c8e4982ca397f29823b521e05f29ed632826bfb02646990cc9c WHIRLPOOL fdb36ee7e9f9500840bf19f37d8383aa665e42b995b58206eb46c87017838d7c6d746d017f2f8c52ba15823bfec103544405319a4d90911ed6734390ef76140a
+DIST mod_musicindex-1.4.1_vcss 1547 SHA256 a5e988ededb2aa6ac2fbada686f36a5185bcfa983e316729a4540fb87ec54a0b SHA512 6c2fa4a0c3fbad68752d7471f95838b69816fd00f58c28f32076af24972117d8b0f2cebb075548ec1317f886a8955cf5686dda571c4d5a823d3ff09da8e33a70 WHIRLPOOL f57b89b7792a175f5cdff71900698cdf59c898cec46dc9e6f4ae6e7b803589924726232aab67506b5bda662187a502ff743babfca9456c001a7088aa16488b0b
diff --git a/www-apache/mod_musicindex/files/50_mod_musicindex.conf b/www-apache/mod_musicindex/files/50_mod_musicindex.conf
new file mode 100644
index 000000000000..1d3db0caebf5
--- /dev/null
+++ b/www-apache/mod_musicindex/files/50_mod_musicindex.conf
@@ -0,0 +1,5 @@
+<IfDefine MUSICINDEX>
+LoadModule musicindex_module modules/mod_musicindex.so
+</IfDefine>
+
+# vim: ts=4 filetype=apache
diff --git a/www-apache/mod_musicindex/metadata.xml b/www-apache/mod_musicindex/metadata.xml
new file mode 100644
index 000000000000..e4c6a0be74cc
--- /dev/null
+++ b/www-apache/mod_musicindex/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer><email>maintainer-needed@gentoo.org</email></maintainer>
+ <use>
+ <flag name="cache">Add File cache support</flag>
+ <flag name="mysql">Add MySQL cache support</flag>
+ <flag name="archive">Add archive support</flag>
+ </use>
+</pkgmetadata>
diff --git a/www-apache/mod_musicindex/mod_musicindex-1.4.1.ebuild b/www-apache/mod_musicindex/mod_musicindex-1.4.1.ebuild
new file mode 100644
index 000000000000..ed79e8f4f3b2
--- /dev/null
+++ b/www-apache/mod_musicindex/mod_musicindex-1.4.1.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit apache-module
+
+DESCRIPTION="mod_musicindex allows nice displaying of directories containing music files"
+HOMEPAGE="http://www.parisc-linux.org/~varenet/musicindex/"
+SRC_URI="http://hacks.slashdirt.org/musicindex/${P}.tar.gz
+ http://validator.w3.org/feed/images/valid-rss.png -> ${P}_valid-rss.png
+ http://jigsaw.w3.org/css-validator/images/vcss -> ${P}_vcss
+ http://www.w3.org/Icons/valid-xhtml11 -> ${P}_valid-xhtml11"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="+mp3 +mp4 +flac +vorbis +cache mysql archive"
+
+DEPEND="mp3? ( media-libs/libmad media-libs/libid3tag )
+ mp4? ( media-libs/libmp4v2:0 )
+ flac? ( media-libs/flac )
+ vorbis? ( media-libs/libvorbis )
+ archive? ( app-arch/libarchive )
+ mysql? ( virtual/mysql )"
+RDEPEND="${DEPEND}
+ sys-devel/libtool"
+
+APACHE2_MOD_CONF="50_${PN}"
+APACHE2_MOD_DEFINE="MUSICINDEX"
+DOCFILES="AUTHORS BUGS ChangeLog README UPGRADING"
+
+need_apache2
+
+src_configure() {
+ econf \
+ $(use_enable mp3) \
+ $(use_enable mp4) \
+ $(use_enable flac) \
+ $(use_enable vorbis) \
+ $(use_enable archive) \
+ $(use_enable cache filecache) \
+ $(use_enable mysql mysqlcache)
+}
+
+src_compile() {
+ emake || die "emake failed"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "emake failed"
+ apache-module_src_install
+
+ # install W3C images
+ insinto /usr/share/mod_musicindex
+ newins "${DISTDIR}/${P}_valid-rss.png" valid-rss.png
+ newins "${DISTDIR}/${P}_valid-xhtml11" valid-xhtml11
+ newins "${DISTDIR}/${P}_vcss" vcss
+}
diff --git a/www-apache/mod_nss/Manifest b/www-apache/mod_nss/Manifest
new file mode 100644
index 000000000000..fca1aba0710b
--- /dev/null
+++ b/www-apache/mod_nss/Manifest
@@ -0,0 +1 @@
+DIST mod_nss-1.0.11.tar.gz 159176 SHA256 a5a824dc77382ba61517cc7dedbbd8c4c1e6b984b1d9498e24995aeed4bd1597 SHA512 659ce74a48bf09d5ade3c1cc7f64bb3b529049f8591519000d59079485c8231a60a681718a380fa4ec9897216909f24dc6bab88d023a00dd2d6b08d997b5ef47 WHIRLPOOL b97b92d3f8b7e132a8e13661d41fcb5b920f1ebcd6f203e70d4f3108061ae8e3c3d99e3d29c0e041aec33c8787b18207c2e9c2ae6adc8063d63f7ab17195a2e5
diff --git a/www-apache/mod_nss/files/47_mod_nss.conf b/www-apache/mod_nss/files/47_mod_nss.conf
new file mode 100644
index 000000000000..731f61c03b35
--- /dev/null
+++ b/www-apache/mod_nss/files/47_mod_nss.conf
@@ -0,0 +1,224 @@
+#
+# This is the Apache server configuration file providing SSL support using.
+# the mod_nss plugin. It contains the configuration directives to instruct
+# the server how to serve pages over an https connection.
+#
+# Do NOT simply read the instructions in here without understanding
+# what they do. They're here only as hints or reminders. If you are unsure
+# consult the online docs. You have been warned.
+#
+
+<IfDefine NSS>
+ LoadModule nss_module modules/mod_nss.so
+</IfDefine>
+
+<IfModule mod_nss.c>
+#
+# When we also provide SSL we have to listen to the
+# standard HTTP port (see above) and to the HTTPS port
+#
+# Note: Configurations that use IPv6 but not IPv4-mapped addresses need two
+# Listen directives: "Listen [::]:8443" and "Listen 0.0.0.0:8443"
+#
+Listen 8443
+
+##
+## SSL Global Context
+##
+## All SSL configuration in this context applies both to
+## the main server and all SSL-enabled virtual hosts.
+##
+
+#
+# Some MIME-types for downloading Certificates and CRLs
+#
+AddType application/x-x509-ca-cert .crt
+AddType application/x-pkcs7-crl .crl
+
+# Pass Phrase Dialog:
+# Configure the pass phrase gathering process.
+# The filtering dialog program (`builtin' is a internal
+# terminal dialog) has to provide the pass phrase on stdout.
+NSSPassPhraseDialog builtin
+
+
+# Pass Phrase Helper:
+# This helper program stores the token password pins between
+# restarts of Apache.
+NSSPassPhraseHelper /usr/sbin/nss_pcache
+
+# Configure the SSL Session Cache.
+# NSSSessionCacheSize is the number of entries in the cache.
+# NSSSessionCacheTimeout is the SSL2 session timeout (in seconds).
+# NSSSession3CacheTimeout is the SSL3/TLS session timeout (in seconds).
+NSSSessionCacheSize 10000
+NSSSessionCacheTimeout 100
+NSSSession3CacheTimeout 86400
+
+#
+# Pseudo Random Number Generator (PRNG):
+# Configure one or more sources to seed the PRNG of the SSL library.
+# The seed data should be of good random quality.
+# WARNING! On some platforms /dev/random blocks if not enough entropy
+# is available. Those platforms usually also provide a non-blocking
+# device, /dev/urandom, which may be used instead.
+#
+# This does not support seeding the RNG with each connection.
+
+NSSRandomSeed startup builtin
+#NSSRandomSeed startup file:/dev/random 512
+#NSSRandomSeed startup file:/dev/urandom 512
+
+</IfModule>
+
+
+#!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!1
+# include -D NSS_EXAMPLE if you have
+#!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!1
+
+
+<IfDefine NSS_EXAMPLE>
+
+##
+## SSL Virtual Host Context
+##
+
+<VirtualHost _default_:8443>
+
+# General setup for the virtual host
+DocumentRoot "/var/www/localhost/htdocs"
+ServerName localhost:8443
+ServerAdmin you@example.com>
+
+
+# Include vhosts.d/default_vhost.include
+
+
+
+# mod_nss can log to separate log files, you can choose to do that if you'd like
+# LogLevel is not inherited from httpd.conf.
+ErrorLog /var/log/apache2/nss_error_log
+TransferLog var/log/apache2/access_log
+LogLevel debug
+
+# SSL Engine Switch:
+# Enable/Disable SSL for this virtual host.
+NSSEngine on
+
+# SSL Cipher Suite:
+# List the ciphers that the client is permitted to negotiate.
+# See the mod_nss documentation for a complete list.
+
+# SSL 3 ciphers. SSL 2 is disabled by default.
+#NSSCipherSuite +rsa_rc4_128_md5,+rsa_rc4_128_sha,+rsa_3des_sha,-rsa_des_sha,-rsa_rc4_40_md5,-rsa_rc2_40_md5,-rsa_null_md5,-rsa_null_sha,+fips_3des_sha,-fips_des_sha,-fortezza,-fortezza_rc4_128_sha,-fortezza_null,-rsa_des_56_sha,-rsa_rc4_56_sha,+rsa_aes_128_sha,+rsa_aes_256_sha
+
+# SSL 3 ciphers + ECC ciphers. SSL 2 is disabled by default.
+#
+# Comment out the NSSCipherSuite line above and use the one below if you have
+# ECC enabled NSS and mod_nss and want to use Elliptical Curve Cryptography
+NSSCipherSuite +rsa_rc4_128_md5,+rsa_rc4_128_sha,+rsa_3des_sha,-rsa_des_sha,-rsa_rc4_40_md5,-rsa_rc2_40_md5,-rsa_null_md5,-rsa_null_sha,+fips_3des_sha,-fips_des_sha,-fortezza,-fortezza_rc4_128_sha,-fortezza_null,-rsa_des_56_sha,-rsa_rc4_56_sha,+rsa_aes_128_sha,+rsa_aes_256_sha,-ecdh_ecdsa_null_sha,+ecdh_ecdsa_rc4_128_sha,+ecdh_ecdsa_3des_sha,+ecdh_ecdsa_aes_128_sha,+ecdh_ecdsa_aes_256_sha,-ecdhe_ecdsa_null_sha,+ecdhe_ecdsa_rc4_128_sha,+ecdhe_ecdsa_3des_sha,+ecdhe_ecdsa_aes_128_sha,+ecdhe_ecdsa_aes_256_sha,-ecdh_rsa_null_sha,+ecdh_rsa_128_sha,+ecdh_rsa_3des_sha,+ecdh_rsa_aes_128_sha,+ecdh_rsa_aes_256_sha,-echde_rsa_null,+ecdhe_rsa_rc4_128_sha,+ecdhe_rsa_3des_sha,+ecdhe_rsa_aes_128_sha,+ecdhe_rsa_aes_256_sha
+
+NSSProtocol SSLv3,TLSv1
+
+# SSL Certificate Nickname:
+# The nickname of the RSA server certificate you are going to use.
+NSSNickname Server-Cert
+
+# SSL Certificate Nickname:
+# The nickname of the ECC server certificate you are going to use, if you
+# have an ECC-enabled version of NSS and mod_nss
+#NSSECCNickname Server-Cert-ecc
+
+# Server Certificate Database:
+# The NSS security database directory that holds the certificates and
+# keys. The database consists of 3 files: cert8.db, key3.db and secmod.db.
+# Provide the directory that these files exist.
+NSSCertificateDatabase /etc/apache2/nss/
+
+# Database Prefix:
+# In order to be able to store multiple NSS databases in one directory
+# they need unique names. This option sets the database prefix used for
+# cert8.db and key3.db.
+#NSSDBPrefix my-prefix-
+
+# Client Authentication (Type):
+# Client certificate verification type. Types are none, optional and
+# require.
+NSSVerifyClient none
+
+#
+# Online Certificate Status Protocol (OCSP).
+# Verify that certificates have not been revoked before accepting them.
+NSSOCSP off
+
+#
+# Use a default OCSP responder. If enabled this will be used regardless
+# of whether one is included in a client certificate. Note that the
+# server certificate is verified during startup.
+#
+# NSSOCSPDefaultURL defines the service URL of the OCSP responder
+# NSSOCSPDefaultName is the nickname of the certificate to trust to
+# sign the OCSP responses.
+#NSSOCSPDefaultResponder on
+#NSSOCSPDefaultURL http://example.com/ocsp/status
+#NSSOCSPDefaultName ocsp-nickname
+
+# Access Control:
+# With SSLRequire you can do per-directory access control based
+# on arbitrary complex boolean expressions containing server
+# variable checks and other lookup directives. The syntax is a
+# mixture between C and Perl. See the mod_nss documentation
+# for more details.
+#<Location />
+#NSSRequire ( %{SSL_CIPHER} !~ m/^(EXP|NULL)/ \
+# and %{SSL_CLIENT_S_DN_O} eq "Snake Oil, Ltd." \
+# and %{SSL_CLIENT_S_DN_OU} in {"Staff", "CA", "Dev"} \
+# and %{TIME_WDAY} >= 1 and %{TIME_WDAY} <= 5 \
+# and %{TIME_HOUR} >= 8 and %{TIME_HOUR} <= 20 ) \
+# or %{REMOTE_ADDR} =~ m/^192\.76\.162\.[0-9]+$/
+#</Location>
+
+# SSL Engine Options:
+# Set various options for the SSL engine.
+# o FakeBasicAuth:
+# Translate the client X.509 into a Basic Authorisation. This means that
+# the standard Auth/DBMAuth methods can be used for access control. The
+# user name is the `one line' version of the client's X.509 certificate.
+# Note that no password is obtained from the user. Every entry in the user
+# file needs this password: `xxj31ZMTZzkVA'.
+# o ExportCertData:
+# This exports two additional environment variables: SSL_CLIENT_CERT and
+# SSL_SERVER_CERT. These contain the PEM-encoded certificates of the
+# server (always existing) and the client (only existing when client
+# authentication is used). This can be used to import the certificates
+# into CGI scripts.
+# o StdEnvVars:
+# This exports the standard SSL/TLS related `SSL_*' environment variables.
+# Per default this exportation is switched off for performance reasons,
+# because the extraction step is an expensive operation and is usually
+# useless for serving static content. So one usually enables the
+# exportation for CGI and SSI requests only.
+# o StrictRequire:
+# This denies access when "NSSRequireSSL" or "NSSRequire" applied even
+# under a "Satisfy any" situation, i.e. when it applies access is denied
+# and no other module can change it.
+# o OptRenegotiate:
+# This enables optimized SSL connection renegotiation handling when SSL
+# directives are used in per-directory context.
+#NSSOptions +FakeBasicAuth +ExportCertData +CompatEnvVars +StrictRequire
+<Files ~ "\.(cgi|shtml|phtml|php3?)$">
+ NSSOptions +StdEnvVars
+</Files>
+<Directory "/usr/cgi-bin">
+ NSSOptions +StdEnvVars
+</Directory>
+
+# Per-Server Logging:
+# The home of a custom SSL log file. Use this when you want a
+# compact non-error SSL logfile on a virtual host basis.
+#CustomLog /home/rcrit/redhat/apache/logs/ssl_request_log \
+# "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
+
+</VirtualHost>
+
+</IfDefine>
diff --git a/www-apache/mod_nss/metadata.xml b/www-apache/mod_nss/metadata.xml
new file mode 100644
index 000000000000..1508bf7f6ae4
--- /dev/null
+++ b/www-apache/mod_nss/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+ <email>lxnay@gentoo.org</email>
+</maintainer>
+<use>
+ <flag name='ecc'>enable Elliptical Curve Cyptography</flag>
+</use>
+</pkgmetadata>
diff --git a/www-apache/mod_nss/mod_nss-1.0.11.ebuild b/www-apache/mod_nss/mod_nss-1.0.11.ebuild
new file mode 100644
index 000000000000..26a9b92c985b
--- /dev/null
+++ b/www-apache/mod_nss/mod_nss-1.0.11.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools apache-module eutils
+
+DESCRIPTION="SSL/TLS module for the Apache HTTP server"
+HOMEPAGE="https://fedorahosted.org/mod_nss/"
+SRC_URI="https://fedorahosted.org/released/mod_nss/${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="+ecc"
+
+DEPEND=">=dev-libs/nss-3.11.4
+ >=dev-libs/nspr-4.6.4
+ virtual/pkgconfig
+ sys-apps/sed
+"
+RDEPEND="
+ >=dev-libs/nss-3.11.4
+ >=dev-libs/nspr-4.6.4
+ net-dns/bind-tools
+"
+
+APACHE2_MOD_CONF="47_${PN}"
+APACHE2_MOD_DEFINE="NSS"
+
+DOCFILES="NOTICE README"
+
+need_apache2
+
+src_prepare() {
+ # setup proper exec name
+ sed -i -e 's/certutil/nsscertutil/' gencert.in || die "sed failed"
+ epatch "${FILESDIR}"/${PN}-parallel-build.patch
+
+ eautoreconf
+}
+
+src_configure() {
+ econf $(use_enable ecc) --with-apxs=${APXS}
+}
+
+src_compile() {
+ emake
+}
+
+src_install() {
+ # override broken build system
+ mv .libs/libmodnss.so .libs/"${PN}".so || die "cannot move lib"
+ dosbin gencert nss_pcache
+ dohtml docs/mod_nss.html
+ newbin migrate.pl nss_migrate
+ dodir /etc/apache2/nss
+ apache-module_src_install
+}
diff --git a/www-apache/mod_pcgi2/Manifest b/www-apache/mod_pcgi2/Manifest
new file mode 100644
index 000000000000..88dce91941ba
--- /dev/null
+++ b/www-apache/mod_pcgi2/Manifest
@@ -0,0 +1 @@
+DIST mod_pcgi2-2.0.2-src.tar.gz 32214 SHA256 853f8a02483774d3cf9f1861d467481086fc75cbd38f5e0a00c265574587a63e
diff --git a/www-apache/mod_pcgi2/files/20_mod_pcgi.conf b/www-apache/mod_pcgi2/files/20_mod_pcgi.conf
new file mode 100644
index 000000000000..4849530c96bc
--- /dev/null
+++ b/www-apache/mod_pcgi2/files/20_mod_pcgi.conf
@@ -0,0 +1,8 @@
+<IfDefine PCGI>
+LoadModule pcgi2_module modules/mod_pcgi2.so
+
+# please see /usr/share/doc/mod_pcgi-*/README
+# for details on the required apache directives
+</IfDefine>
+
+# vim: ts=4 filetype=apache
diff --git a/www-apache/mod_pcgi2/metadata.xml b/www-apache/mod_pcgi2/metadata.xml
new file mode 100644
index 000000000000..4538a68724a6
--- /dev/null
+++ b/www-apache/mod_pcgi2/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer><email>maintainer-needed@gentoo.org</email></maintainer>
+</pkgmetadata>
diff --git a/www-apache/mod_pcgi2/mod_pcgi2-2.0.2.ebuild b/www-apache/mod_pcgi2/mod_pcgi2-2.0.2.ebuild
new file mode 100644
index 000000000000..4fdd2f006ceb
--- /dev/null
+++ b/www-apache/mod_pcgi2/mod_pcgi2-2.0.2.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit apache-module
+
+KEYWORDS="~ppc ~x86"
+
+DESCRIPTION="An Apache module to talk to Zope Corporation's PCGI"
+HOMEPAGE="http://www.zope.org/Members/phd/mod_pcgi2/"
+SRC_URI="http://zope.org/Members/phd/${PN}/${PN}/${P}-src.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+IUSE=""
+
+DEPEND="www-apps/pcgi"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${PN/mod_}"
+
+APXS2_ARGS="-n pcgi2 -DUNIX -DAPACHE2 -DMOD_PCGI2 -c mod_pcgi2.c pcgi-wrapper.c parseinfo.c "
+
+APACHE2_MOD_CONF="20_mod_pcgi"
+APACHE2_MOD_DEFINE="PCGI"
+
+DOCFILES="NEWS README ChangeLog"
+
+need_apache
diff --git a/www-apache/mod_perl/Manifest b/www-apache/mod_perl/Manifest
new file mode 100644
index 000000000000..74557b1dcb49
--- /dev/null
+++ b/www-apache/mod_perl/Manifest
@@ -0,0 +1 @@
+DIST mod_perl-2.0.8.tar.gz 3790026 SHA256 35dc1b7a40a90a395ce88bba2df84f22289975f34d1757de6d715560c20a20e6 SHA512 d5090651699c4436fe8d0a525226543c971aa05db337dc1b1e89023183df1c7dd8b8775f3a0f7d3b9ec40e8c058ac23bd24141cf15a5fe5806226d634dfb4c87 WHIRLPOOL d22e1c353339b08ad752e9f9c7fc0ec4d6a173c4cd3004380b14098e1028737e0eb69d2f56dbe0da3cbfb01b31232c5073d7edb28bf4fed6b2ccd67b09ad7080
diff --git a/www-apache/mod_perl/files/2.0.3/75_mod_perl.2.2.conf b/www-apache/mod_perl/files/2.0.3/75_mod_perl.2.2.conf
new file mode 100644
index 000000000000..596d2cc73c6e
--- /dev/null
+++ b/www-apache/mod_perl/files/2.0.3/75_mod_perl.2.2.conf
@@ -0,0 +1,50 @@
+<IfDefine PERL>
+LoadModule perl_module modules/mod_perl.so
+
+#PerlTrace all
+PerlRequire "/etc/apache2/modules.d/apache2-mod_perl-startup.pl"
+PerlModule ModPerl::Registry
+
+# Provide two aliases to the same cgi-bin directory, to see the effects of the
+# 2 different mod_perl modes for Apache2::Registry Mode
+Alias /perl/ /var/www/localhost/perl/
+# for Apache2::Perlrun Mode
+Alias /cgi-perl/ /var/www/localhost/perl/
+
+<Location /perl-status>
+ SetHandler perl-script
+ PerlResponseHandler Apache2::Status
+ Order deny,allow
+ Deny from all
+ Allow from 127.0.0.1
+</Location>
+
+<Directory /home/*/public_html/perl>
+ SetHandler perl-script
+ PerlResponseHandler ModPerl::PerlRun
+ Options -Indexes ExecCGI
+ PerlOptions +ParseHeaders
+</Directory>
+
+# set Apache::Registry Mode for /perl Alias
+<Location /perl/*.pl>
+ SetHandler perl-script
+ PerlResponseHandler ModPerl::Registry
+ Options -Indexes ExecCGI
+ PerlSendHeader On
+ Order allow,deny
+ Allow from all
+</Location>
+
+# set Apache::PerlRun Mode for /cgi-perl Alias
+<Location /cgi-perl/*.pl>
+ SetHandler perl-script
+ PerlResponseHandler ModPerl::PerlRun
+ Options -Indexes ExecCGI
+ PerlSendHeader On
+ Order allow,deny
+ Allow from all
+</Location>
+</IfDefine>
+
+# vim: ts=4 filetype=apache
diff --git a/www-apache/mod_perl/files/2.0.3/75_mod_perl.conf b/www-apache/mod_perl/files/2.0.3/75_mod_perl.conf
new file mode 100644
index 000000000000..9cf7b7b4394f
--- /dev/null
+++ b/www-apache/mod_perl/files/2.0.3/75_mod_perl.conf
@@ -0,0 +1,54 @@
+<IfDefine PERL>
+LoadModule perl_module modules/mod_perl.so
+
+#PerlTrace all
+PerlRequire "/etc/apache2/modules.d/apache2-mod_perl-startup.pl"
+PerlModule ModPerl::Registry
+
+# Provide two aliases to the same cgi-bin directory, to see the effects of the
+# 2 different mod_perl modes for Apache2::Registry Mode
+Alias /perl/ /var/www/localhost/perl/
+# for Apache2::Perlrun Mode
+Alias /cgi-perl/ /var/www/localhost/perl/
+
+<Location /perl-status>
+ SetHandler perl-script
+ PerlResponseHandler Apache2::Status
+ Require host localhost
+</Location>
+
+<Directory /home/*/public_html/perl>
+ SetHandler perl-script
+ PerlResponseHandler ModPerl::PerlRun
+ PerlOptions +ParseHeaders
+
+ # Clear all existing options and only permit cgi.
+ Options ExecCGI
+</Directory>
+
+# set Apache::Registry Mode for /perl Alias
+<Location /perl/*.pl>
+ SetHandler perl-script
+ PerlResponseHandler ModPerl::Registry
+ PerlSendHeader On
+
+ # Clear all existing options and only permit cgi.
+ Options ExecCGI
+
+ Require all granted
+</Location>
+
+# set Apache::PerlRun Mode for /cgi-perl Alias
+<Location /cgi-perl/*.pl>
+ SetHandler perl-script
+ PerlResponseHandler ModPerl::PerlRun
+ PerlSendHeader On
+
+ # Clear all existing options and only permit cgi.
+ Options ExecCGI
+
+ Require all granted
+</Location>
+</IfDefine>
+
+# vim: ts=4 filetype=apache
diff --git a/www-apache/mod_perl/files/2.0.3/apache2-mod_perl-startup.pl b/www-apache/mod_perl/files/2.0.3/apache2-mod_perl-startup.pl
new file mode 100644
index 000000000000..afc048ac125b
--- /dev/null
+++ b/www-apache/mod_perl/files/2.0.3/apache2-mod_perl-startup.pl
@@ -0,0 +1,24 @@
+use lib qw(/home/httpd/perl);
+
+# enable if the mod_perl 1.0 compatibility is needed
+#use Apache2::compat ();
+
+use ModPerl::Util (); #for CORE::GLOBAL::exit
+
+use Apache2::RequestRec ();
+use Apache2::RequestIO ();
+use Apache2::RequestUtil ();
+
+use Apache2::ServerRec ();
+use Apache2::ServerUtil ();
+use Apache2::Connection ();
+use Apache2::Log ();
+
+use APR::Table ();
+
+use ModPerl::Registry ();
+
+use Apache2::Const -compile => ':common';
+use APR::Const -compile => ':common';
+
+1;
diff --git a/www-apache/mod_perl/files/mod_perl-2.0.1-sneak-tmpdir.patch b/www-apache/mod_perl/files/mod_perl-2.0.1-sneak-tmpdir.patch
new file mode 100644
index 000000000000..0930278aeba3
--- /dev/null
+++ b/www-apache/mod_perl/files/mod_perl-2.0.1-sneak-tmpdir.patch
@@ -0,0 +1,11 @@
+--- t/conf/modperl_extra.pl.orig 2005-05-16 18:27:45.000000000 +1000
++++ t/conf/modperl_extra.pl 2005-05-16 18:34:46.000000000 +1000
+@@ -136,6 +136,8 @@
+ sub test_modperl_env {
+ # see t/response/TestModperl/env.pm
+ $ENV{MODPERL_EXTRA_PL} = __FILE__;
++ $ENV{TMPDIR} = __FILE__;
++ $ENV{TMPDIR} =~ s,/work/.*,/temp,;
+ }
+
+ 1;
diff --git a/www-apache/mod_perl/files/mod_perl-2.0.4-inline.patch b/www-apache/mod_perl/files/mod_perl-2.0.4-inline.patch
new file mode 100644
index 000000000000..5c51a803b816
--- /dev/null
+++ b/www-apache/mod_perl/files/mod_perl-2.0.4-inline.patch
@@ -0,0 +1,22 @@
+https://bugs.gentoo.org/550244
+
+taken from Fedora:
+http://pkgs.fedoraproject.org/cgit/mod_perl.git/tree/mod_perl-2.0.4-inline.patch?h=f22
+
+fixes building with gcc-5:
+apache2: Syntax error on line 148 of /etc/apache2/httpd.conf:
+Syntax error on line 2 of /etc/apache2/modules.d/75_mod_perl.conf:
+Cannot load modules/mod_perl.so into server:
+/usr/lib64/apache2/modules/mod_perl.so: undefined symbol: modperl_handler_name
+
+--- mod_perl-2.0.4/src/modules/perl/modperl_common_util.h.inline
++++ mod_perl-2.0.4/src/modules/perl/modperl_common_util.h
+@@ -22,7 +22,7 @@
+ #ifdef MP_DEBUG
+ #define MP_INLINE
+ #else
+-#define MP_INLINE APR_INLINE
++#define MP_INLINE
+ #endif
+
+ #ifdef CYGWIN
diff --git a/www-apache/mod_perl/files/mod_perl-2.0.7-bundled-Apache-Test.patch b/www-apache/mod_perl/files/mod_perl-2.0.7-bundled-Apache-Test.patch
new file mode 100644
index 000000000000..478495e5d769
--- /dev/null
+++ b/www-apache/mod_perl/files/mod_perl-2.0.7-bundled-Apache-Test.patch
@@ -0,0 +1,134 @@
+diff --git a/Makefile.PL b/Makefile.PL
+index c4a0430..e85cf01 100644
+--- a/Makefile.PL
++++ b/Makefile.PL
+@@ -24,7 +24,7 @@ BEGIN {
+
+ }
+
+-use lib qw(lib Apache-Test/lib);
++use lib qw(lib);
+
+ use Config;
+ use File::Spec::Functions;
+@@ -117,16 +117,6 @@ sub get_DEFINE {
+ }
+
+ sub configure {
+-
+- # mod_perl test suite relies on having Apache-Test bundled with
+- # the mod_perl source, since any pre-installed version may not do
+- # the right thing
+- unless (-d "Apache-Test") {
+- error "Can't find a sub-directory Apache-Test. " .
+- "Make sure that you are using a complete source distribution";
+- exit 1;
+- }
+-
+ set_modperl_version();
+
+ if ($old_modperl_version) {
+@@ -798,14 +788,9 @@ run_tests : test_clean
+ run_subtests ::
+ cd ModPerl-Registry && $(MAKE) test
+
+-run_subtests ::
+- cd Apache-Reload && $(MAKE) test
+-
+ EOF
+
+ $preamble .= <<'EOF' unless $build->mpm_is_threaded();
+-run_subtests ::
+- cd Apache-SizeLimit && $(MAKE) test
+
+ EOF
+
+@@ -816,36 +801,6 @@ EOF
+ return $preamble;
+ }
+
+-sub MY::postamble {
+- my $self = shift;
+-
+- my $string = $self->ModPerl::BuildMM::MY::postamble;
+-
+- $string .= <<'EOF';
+-mydist : Apache-Test/META.yml mod_perl.spec manifest tardist
+-
+-rpm: dist
+- @[ -d $(PWD)/rpm ] || mkdir $(PWD)/rpm
+- rpmbuild -ta --define "_rpmdir $(PWD)/rpm" \
+- --define "_srcrpmdir $(PWD)/rpm" \
+- $(DISTVNAME).tar.gz
+- @mv $(PWD)/rpm/*/*.rpm $(PWD)/rpm/
+- @rm -rf $(PWD)/rpm/*/
+-
+-mod_perl.spec: build/make_rpm_spec
+- $(PERL) build/make_rpm_spec
+-
+-Apache-Test/META.yml:
+- cd Apache-Test && make metafile
+-
+-tag :
+- svn copy https://svn.apache.org/repos/asf/perl/modperl/branches/release/$(VERSION_SYM) https://svn.apache.org/repos/asf/perl/modperl/tags/$(VERSION_SYM)
+- svn copy https://svn.apache.org/repos/asf/perl/modperl/docs/trunk https://svn.apache.org/repos/asf/perl/modperl/docs/tags/$(VERSION_SYM)
+-EOF
+-
+- return $string;
+-}
+-
+ # this is a workaround so that ModPerl::MM will move MY::constants
+ # away, and Apache-Test/Makefile.PL which has its own MY::constants
+ # won't get complaints on MY::constants redefined
+diff --git a/ModPerl-Registry/Makefile.PL b/ModPerl-Registry/Makefile.PL
+index e72e65c..8610935 100644
+--- a/ModPerl-Registry/Makefile.PL
++++ b/ModPerl-Registry/Makefile.PL
+@@ -14,7 +14,7 @@ use Apache::TestMM qw(test clean);
+
+ # prerequisites
+ my %require = (
+- "Apache::Test" => "", # any version will do?
++ "Apache::Test" => 0, # any version will do?
+ );
+
+ my @scripts = qw(t/TEST t/SMOKE);
+diff --git a/lib/ModPerl/BuildMM.pm b/lib/ModPerl/BuildMM.pm
+index 1c729e2..8651999 100644
+--- a/lib/ModPerl/BuildMM.pm
++++ b/lib/ModPerl/BuildMM.pm
+@@ -38,12 +38,10 @@ my @methods = grep *{$stash->{$_}}{CODE}, keys %$stash;
+ ModPerl::MM::override_eu_mm_mv_all_methods(@methods);
+ use strict 'refs';
+
+-my $apache_test_dir = catdir Cwd::getcwd(), "Apache-Test", "lib";
+-
+ #to override MakeMaker MOD_INSTALL macro
+ sub mod_install {
+ q{$(PERL) -I$(INST_LIB) -I$(PERL_LIB) \\}."\n" .
+- qq{-I$apache_test_dir -MModPerl::BuildMM \\}."\n" .
++ qq{-MModPerl::BuildMM \\}."\n" .
+ q{-e "ExtUtils::Install::install({@ARGV},'$(VERBINST)',0,'$(UNINST)');"}."\n";
+ }
+
+@@ -269,7 +267,7 @@ sub ModPerl::BuildMM::MY::postamble {
+
+ push @target,
+ '$(FULLPERL) -I$(INST_LIB) ' .
+- "-I$apache_test_dir -MModPerl::BuildMM " .
++ "-MModPerl::BuildMM " .
+ "-e ModPerl::BuildMM::glue_pod $pm $podpath $blib";
+
+ # Win32 doesn't normally install man pages
+diff --git a/lib/ModPerl/Manifest.pm b/lib/ModPerl/Manifest.pm
+index 1e856bc..9f1833c 100644
+--- a/lib/ModPerl/Manifest.pm
++++ b/lib/ModPerl/Manifest.pm
+@@ -33,7 +33,6 @@ our @EXPORT_OK = qw(mkmanifest);
+ my @add_files = qw{
+ MANIFEST
+ mod_perl.spec
+- Apache-Test/META.yml
+ };
+
+ sub get_svn_files {
diff --git a/www-apache/mod_perl/files/mod_perl-2.0.8-bundled-Apache-Test.patch b/www-apache/mod_perl/files/mod_perl-2.0.8-bundled-Apache-Test.patch
new file mode 100644
index 000000000000..2e4da922aeaf
--- /dev/null
+++ b/www-apache/mod_perl/files/mod_perl-2.0.8-bundled-Apache-Test.patch
@@ -0,0 +1,127 @@
+--- a/Makefile.PL
++++ b/Makefile.PL
+@@ -24,7 +24,7 @@ BEGIN {
+
+ }
+
+-use lib qw(lib Apache-Test/lib);
++use lib qw(lib);
+
+ use Config;
+ use File::Spec::Functions;
+@@ -117,16 +117,6 @@ sub get_DEFINE {
+ }
+
+ sub configure {
+-
+- # mod_perl test suite relies on having Apache-Test bundled with
+- # the mod_perl source, since any pre-installed version may not do
+- # the right thing
+- unless (-d "Apache-Test") {
+- error "Can't find a sub-directory Apache-Test. " .
+- "Make sure that you are using a complete source distribution";
+- exit 1;
+- }
+-
+ set_modperl_version();
+
+ if ($old_modperl_version) {
+@@ -798,14 +788,9 @@ run_tests : test_clean
+ run_subtests ::
+ cd ModPerl-Registry && $(MAKE) test
+
+-run_subtests ::
+- cd Apache-Reload && $(MAKE) test
+-
+ EOF
+
+ $preamble .= <<'EOF' unless $build->mpm_is_threaded();
+-run_subtests ::
+- cd Apache-SizeLimit && $(MAKE) test
+
+ EOF
+
+@@ -816,37 +801,6 @@ EOF
+ return $preamble;
+ }
+
+-sub MY::postamble {
+- my $self = shift;
+-
+- my $string = $self->ModPerl::BuildMM::MY::postamble;
+-
+- $string .= <<'EOF';
+-mydist : Apache-Test/META.yml mod_perl.spec manifest tardist
+-
+-rpm: dist
+- @[ -d $(PWD)/rpm ] || mkdir $(PWD)/rpm
+- rpmbuild -ta --define "_rpmdir $(PWD)/rpm" \
+- --define "_srcrpmdir $(PWD)/rpm" \
+- $(DISTVNAME).tar.gz
+- @mv $(PWD)/rpm/*/*.rpm $(PWD)/rpm/
+- @rm -rf $(PWD)/rpm/*/
+-
+-mod_perl.spec: build/make_rpm_spec
+- $(PERL) build/make_rpm_spec
+-
+-Apache-Test/META.yml:
+- cd Apache-Test && make metafile
+-
+-tag :
+- svn copy https://svn.apache.org/repos/asf/perl/modperl/trunk https://svn.apache.org/repos/asf/perl/modperl/branches/release/$(VERSION_SYM)
+- svn copy https://svn.apache.org/repos/asf/perl/modperl/branches/release/$(VERSION_SYM) https://svn.apache.org/repos/asf/perl/modperl/tags/$(VERSION_SYM)
+- svn copy https://svn.apache.org/repos/asf/perl/modperl/docs/trunk https://svn.apache.org/repos/asf/perl/modperl/docs/tags/$(VERSION_SYM)
+-EOF
+-
+- return $string;
+-}
+-
+ # this is a workaround so that ModPerl::MM will move MY::constants
+ # away, and Apache-Test/Makefile.PL which has its own MY::constants
+ # won't get complaints on MY::constants redefined
+--- a/ModPerl-Registry/Makefile.PL
++++ b/ModPerl-Registry/Makefile.PL
+@@ -14,7 +14,7 @@ use Apache::TestMM qw(test clean);
+
+ # prerequisites
+ my %require = (
+- "Apache::Test" => "", # any version will do?
++ "Apache::Test" => 0, # any version will do?
+ );
+
+ my @scripts = qw(t/TEST t/SMOKE);
+--- a/lib/ModPerl/BuildMM.pm
++++ b/lib/ModPerl/BuildMM.pm
+@@ -38,12 +38,10 @@ my @methods = grep *{$stash->{$_}}{CODE}
+ ModPerl::MM::override_eu_mm_mv_all_methods(@methods);
+ use strict 'refs';
+
+-my $apache_test_dir = catdir Cwd::getcwd(), "Apache-Test", "lib";
+-
+ #to override MakeMaker MOD_INSTALL macro
+ sub mod_install {
+ q{$(PERL) -I$(INST_LIB) -I$(PERL_LIB) \\}."\n" .
+- qq{-I$apache_test_dir -MModPerl::BuildMM \\}."\n" .
++ qq{-MModPerl::BuildMM \\}."\n" .
+ q{-e "ExtUtils::Install::install({@ARGV},'$(VERBINST)',0,'$(UNINST)');"}."\n";
+ }
+
+@@ -269,7 +267,7 @@ sub ModPerl::BuildMM::MY::postamble {
+
+ push @target,
+ '$(FULLPERL) -I$(INST_LIB) ' .
+- "-I$apache_test_dir -MModPerl::BuildMM " .
++ "-MModPerl::BuildMM " .
+ "-e ModPerl::BuildMM::glue_pod $pm $podpath $blib";
+
+ # Win32 doesn't normally install man pages
+--- a/lib/ModPerl/Manifest.pm
++++ b/lib/ModPerl/Manifest.pm
+@@ -33,7 +33,6 @@ our @EXPORT_OK = qw(mkmanifest);
+ my @add_files = qw{
+ MANIFEST
+ mod_perl.spec
+- Apache-Test/META.yml
+ };
+
+ sub get_svn_files {
diff --git a/www-apache/mod_perl/files/use-client_ip-client_add-instead-of-remote_ip-remote.patch b/www-apache/mod_perl/files/use-client_ip-client_add-instead-of-remote_ip-remote.patch
new file mode 100644
index 000000000000..1a695b85409c
--- /dev/null
+++ b/www-apache/mod_perl/files/use-client_ip-client_add-instead-of-remote_ip-remote.patch
@@ -0,0 +1,47 @@
+From 3fb7843aa2aa992be430068929f4e1cc7787a233 Mon Sep 17 00:00:00 2001
+From: Martin Jansa <Martin.Jansa@gmail.com>
+Date: Tue, 3 Apr 2012 19:25:41 +0200
+Subject: [PATCH] use client_ip/client_add instead of remote_ip/remote_addr
+
+Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
+---
+ xs/maps/apache2_structures.map | 4 ++--
+ xs/tables/current/Apache2/StructureTable.pm | 4 ++--
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/xs/maps/apache2_structures.map b/xs/maps/apache2_structures.map
+index f86ec93..c0fcf78 100644
+--- a/xs/maps/apache2_structures.map
++++ b/xs/maps/apache2_structures.map
+@@ -106,8 +106,8 @@ $ limit_req_fields
+ < local_addr
+ < local_ip
+ < local_host
+-< remote_addr
+- remote_ip
++< client_addr
++ client_ip
+ < remote_host
+ - remote_logname
+ < aborted
+diff --git a/xs/tables/current/Apache2/StructureTable.pm b/xs/tables/current/Apache2/StructureTable.pm
+index af50be1..0c0465a 100644
+--- a/xs/tables/current/Apache2/StructureTable.pm
++++ b/xs/tables/current/Apache2/StructureTable.pm
+@@ -2708,11 +2708,11 @@ $Apache2::StructureTable = [
+ },
+ {
+ 'type' => 'apr_sockaddr_t *',
+- 'name' => 'remote_addr'
++ 'name' => 'client_addr'
+ },
+ {
+ 'type' => 'char *',
+- 'name' => 'remote_ip'
++ 'name' => 'client_ip'
+ },
+ {
+ 'type' => 'char *',
+--
+1.7.8.5
+
diff --git a/www-apache/mod_perl/files/use-log.level-instead-of-loglevel.patch b/www-apache/mod_perl/files/use-log.level-instead-of-loglevel.patch
new file mode 100644
index 000000000000..aeb8d98af79d
--- /dev/null
+++ b/www-apache/mod_perl/files/use-log.level-instead-of-loglevel.patch
@@ -0,0 +1,27 @@
+From 0d6ac25c1c7871be52e8399c6e8bc8509ed5f3d9 Mon Sep 17 00:00:00 2001
+From: Martin Jansa <Martin.Jansa@gmail.com>
+Date: Tue, 3 Apr 2012 19:30:33 +0200
+Subject: [PATCH] use log.level instead of loglevel
+
+Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
+---
+ xs/maps/apache2_structures.map | 2 +-
+ xs/tables/current/Apache2/StructureTable.pm | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/xs/tables/current/Apache2/StructureTable.pm b/xs/tables/current/Apache2/StructureTable.pm
+index 0c0465a..439184e 100644
+--- a/xs/tables/current/Apache2/StructureTable.pm
++++ b/xs/tables/current/Apache2/StructureTable.pm
+@@ -3245,7 +3245,7 @@ $Apache2::StructureTable = [
+ },
+ {
+ 'type' => 'int',
+- 'name' => 'loglevel'
++ 'name' => 'log.level'
+ },
+ {
+ 'type' => 'int',
+--
+1.7.8.5
+
diff --git a/www-apache/mod_perl/metadata.xml b/www-apache/mod_perl/metadata.xml
new file mode 100644
index 000000000000..8be00b39dc0e
--- /dev/null
+++ b/www-apache/mod_perl/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>perl</herd>
+ <maintainer>
+ <email>idl0r@gentoo.org</email>
+ <name>Christian Ruppert</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/www-apache/mod_perl/mod_perl-2.0.8-r1.ebuild b/www-apache/mod_perl/mod_perl-2.0.8-r1.ebuild
new file mode 100644
index 000000000000..0520b8c66d7e
--- /dev/null
+++ b/www-apache/mod_perl/mod_perl-2.0.8-r1.ebuild
@@ -0,0 +1,162 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit depend.apache apache-module perl-module eutils
+
+DESCRIPTION="An embedded Perl interpreter for Apache2"
+SRC_URI="mirror://apache/perl/${P}.tar.gz"
+HOMEPAGE="https://projects.apache.org/projects/mod_perl.html"
+
+LICENSE="GPL-2"
+KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
+IUSE="debug"
+SLOT="1"
+
+# Make sure we always use the latest Apache-Test version or even check the
+# version of the bundled Apache-Test!
+#
+# We need both, apache and perl but either apache without threads or perl with
+# ithreads, bug 373943
+DEPEND="
+ >=dev-perl/Apache-Test-1.360
+ >=dev-perl/CGI-3.08
+ dev-lang/perl[ithreads]
+ www-servers/apache
+"
+RDEPEND="${DEPEND}"
+PDEPEND=">=dev-perl/Apache-Reload-0.11
+ >=dev-perl/Apache-SizeLimit-0.95"
+
+APACHE2_MOD_FILE="${S}/src/modules/perl/mod_perl.so"
+APACHE2_MOD_CONF="2.0.3/75_${PN}"
+APACHE2_MOD_DEFINE="PERL"
+
+SRC_TEST="do"
+
+DOCFILES="Changes INSTALL README STATUS"
+
+need_apache2_4
+
+src_prepare() {
+ perl-module_src_prepare
+
+ # I am not entirely happy with this solution, but here's what's
+ # going on here if someone wants to take a stab at another
+ # approach. When userpriv compilation is off, then the make
+ # process drops to user "nobody" to run the test servers. This
+ # server is closed, and then the socket is rebound using
+ # SO_REUSEADDR. If the same user does this, there is no problem,
+ # and the socket may be rebound immediately. If a different user
+ # (yes, in my testing, even root) attempts to rebind, it fails.
+ # Since the "is the socket available yet" code and the
+ # second-batch bind call both run as root, this will fail.
+
+ # The upstream settings on my test machine cause the second batch
+ # of tests to fail, believing the socket to still be in use. I
+ # tried patching various parts to make them run as the user
+ # specified in $config->{vars}{user} using getpwnam, but found
+ # this patch to be fairly intrusive, because the userid must be
+ # restored and the patch must be applied to multiple places.
+
+ # For now, we will simply extend the timeout in hopes that in the
+ # non-userpriv case, the socket will clear from the kernel tables
+ # normally, and the tests will proceed.
+
+ # If anybody is still having problems, then commenting out "make
+ # test" below should allow the software to build properly.
+
+ # Robert Coie <rac@gentoo.org> 2003.05.06
+# sed -i -e "s/sleep \$_/sleep \$_ << 2/" \
+# "${S}"/Apache-Test/lib/Apache/TestServer.pm \
+# || die "problem editing TestServer.pm"
+
+ # rendhalver - this got redone for 2.0.1 and seems to fix the make test problems
+ epatch "${FILESDIR}"/mod_perl-2.0.1-sneak-tmpdir.patch
+
+ # bug 352724
+ epatch "${FILESDIR}/${P}-bundled-Apache-Test.patch"
+ rm -rf Apache-{Test,Reload,SizeLimit}/ lib/Bundle/
+ sed -i -e 's:^Apache-\(Reload\|SizeLimit\|Test\).*::' \
+ -e 's:^lib/Bundle/Apache2.pm::' MANIFEST || die
+
+ # 410453
+ epatch "${FILESDIR}/use-client_ip-client_add-instead-of-remote_ip-remote.patch"
+ epatch "${FILESDIR}/use-log.level-instead-of-loglevel.patch"
+}
+
+src_configure() {
+ local myargs=
+
+ if use debug; then
+ myargs="MP_TRACE=1 MP_DEBUG=1"
+ else
+ myargs="MP_TRACE=0 MP_DEBUG=0"
+ fi
+
+ perl Makefile.PL \
+ PREFIX="${EPREFIX}"/usr \
+ INSTALLDIRS=vendor \
+ MP_USE_DSO=1 \
+ MP_APXS=${APXS} \
+ MP_APR_CONFIG=/usr/bin/apr-1-config \
+ ${myargs} || die
+}
+
+src_test() {
+ # make test notes whether it is running as root, and drops
+ # privileges all the way to "nobody" if so, so we must adjust
+ # write permissions accordingly in this case.
+
+ # IF YOU SUDO TO EMERGE AND HAVE !env_reset set testing will fail!
+ if [[ "$(id -u)" == "0" ]]; then
+ chown nobody:nobody "${WORKDIR}"
+ chown nobody:nobody "${T}"
+ fi
+
+ # this does not || die because of bug 21325. kudos to smark for
+ # the idea of setting HOME.
+ TMPDIR="${T}" HOME="${T}/" perl-module_src_test
+}
+
+src_install() {
+ apache-module_src_install
+
+ emake DESTDIR="${D}" install || die
+
+ # TODO: add some stuff from docs/ back?
+
+ # rendhalver - fix the perllocal.pod that gets installed
+ # it seems to me that this has been getting installed for ages
+ perl_delete_localpod
+ # Remove empty .bs files as well
+ perl_delete_packlist
+
+ insinto "${APACHE_MODULES_CONFDIR}"
+ doins "${FILESDIR}"/2.0.3/apache2-mod_perl-startup.pl || die
+
+ # this is an attempt to get @INC in line with /usr/bin/perl.
+ # there is blib garbage in the mainstream one that can only be
+ # useful during internal testing, so we wait until here and then
+ # just go with a clean slate. should be much easier to see what's
+ # happening and revert if problematic.
+
+ # Sorry for this evil hack...
+ perl_set_version # just to be sure...
+ sed -i -e "s,-I${S}/[^[:space:]\"\']\+[[:space:]]\?,,g" \
+ -e "s,-typemap[[:space:]]${S}/[^[:space:]\"\']\+[[:space:]]\?,,g" \
+ -e "s,${S}\(/[^[:space:]\"\']\+\)\?,/,g" "${D}/${VENDOR_ARCH}/Apache2/BuildConfig.pm" || die
+
+ for fname in $(find "${D}" -type f -not -name '*.so'); do
+ grep -q "\(${D}\|${S}\)" "${fname}" && ewarn "QA: File contains a temporary path ${fname}"
+ sed -i -e "s:\(${D}\|${S}\):/:g" ${fname}
+ done
+ # All the rest
+ perl_remove_temppath
+}
+
+pkg_postinst() {
+ apache-module_pkg_postinst
+}
diff --git a/www-apache/mod_perl/mod_perl-2.0.8-r2.ebuild b/www-apache/mod_perl/mod_perl-2.0.8-r2.ebuild
new file mode 100644
index 000000000000..b4b85c96c065
--- /dev/null
+++ b/www-apache/mod_perl/mod_perl-2.0.8-r2.ebuild
@@ -0,0 +1,162 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit depend.apache apache-module perl-module eutils
+
+DESCRIPTION="An embedded Perl interpreter for Apache2"
+HOMEPAGE="https://projects.apache.org/projects/mod_perl.html"
+SRC_URI="mirror://apache/perl/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="1"
+KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
+IUSE="debug"
+
+# Make sure we always use the latest Apache-Test version or even check the
+# version of the bundled Apache-Test!
+#
+# We need both, apache and perl but either apache without threads or perl with
+# ithreads, bug 373943
+DEPEND="
+ >=dev-perl/Apache-Test-1.360
+ >=dev-perl/CGI-3.08
+ dev-lang/perl[ithreads]
+ www-servers/apache
+"
+RDEPEND="${DEPEND}"
+PDEPEND=">=dev-perl/Apache-Reload-0.11
+ >=dev-perl/Apache-SizeLimit-0.95"
+
+APACHE2_MOD_FILE="${S}/src/modules/perl/mod_perl.so"
+APACHE2_MOD_CONF="2.0.3/75_${PN}"
+APACHE2_MOD_DEFINE="PERL"
+
+SRC_TEST="do"
+
+DOCFILES="Changes INSTALL README STATUS"
+
+need_apache2_4
+
+src_prepare() {
+ perl-module_src_prepare
+
+ # I am not entirely happy with this solution, but here's what's
+ # going on here if someone wants to take a stab at another
+ # approach. When userpriv compilation is off, then the make
+ # process drops to user "nobody" to run the test servers. This
+ # server is closed, and then the socket is rebound using
+ # SO_REUSEADDR. If the same user does this, there is no problem,
+ # and the socket may be rebound immediately. If a different user
+ # (yes, in my testing, even root) attempts to rebind, it fails.
+ # Since the "is the socket available yet" code and the
+ # second-batch bind call both run as root, this will fail.
+
+ # The upstream settings on my test machine cause the second batch
+ # of tests to fail, believing the socket to still be in use. I
+ # tried patching various parts to make them run as the user
+ # specified in $config->{vars}{user} using getpwnam, but found
+ # this patch to be fairly intrusive, because the userid must be
+ # restored and the patch must be applied to multiple places.
+
+ # For now, we will simply extend the timeout in hopes that in the
+ # non-userpriv case, the socket will clear from the kernel tables
+ # normally, and the tests will proceed.
+
+ # If anybody is still having problems, then commenting out "make
+ # test" below should allow the software to build properly.
+
+ # Robert Coie <rac@gentoo.org> 2003.05.06
+# sed -i -e "s/sleep \$_/sleep \$_ << 2/" \
+# "${S}"/Apache-Test/lib/Apache/TestServer.pm \
+# || die "problem editing TestServer.pm"
+
+ # rendhalver - this got redone for 2.0.1 and seems to fix the make test problems
+ epatch "${FILESDIR}"/${PN}-2.0.1-sneak-tmpdir.patch
+ epatch "${FILESDIR}"/${PN}-2.0.4-inline.patch #550244
+
+ # bug 352724
+ epatch "${FILESDIR}/${P}-bundled-Apache-Test.patch"
+ rm -rf Apache-{Test,Reload,SizeLimit}/ lib/Bundle/
+ sed -i \
+ -e 's:^Apache-\(Reload\|SizeLimit\|Test\).*::' \
+ -e 's:^lib/Bundle/Apache2.pm::' \
+ MANIFEST || die
+
+ # 410453
+ epatch "${FILESDIR}/use-client_ip-client_add-instead-of-remote_ip-remote.patch"
+ epatch "${FILESDIR}/use-log.level-instead-of-loglevel.patch"
+}
+
+src_configure() {
+ local debug=$(usex debug 1 0)
+ perl Makefile.PL \
+ PREFIX="${EPREFIX}"/usr \
+ INSTALLDIRS=vendor \
+ MP_USE_DSO=1 \
+ MP_APXS=${APXS} \
+ MP_APR_CONFIG=/usr/bin/apr-1-config \
+ MP_TRACE=${debug} \
+ MP_DEBUG=${debug} \
+ || die
+}
+
+src_test() {
+ # make test notes whether it is running as root, and drops
+ # privileges all the way to "nobody" if so, so we must adjust
+ # write permissions accordingly in this case.
+
+ # IF YOU SUDO TO EMERGE AND HAVE !env_reset set testing will fail!
+ if [[ "$(id -u)" == "0" ]]; then
+ chown nobody:nobody "${WORKDIR}" "${T}"
+ fi
+
+ # this does not || die because of bug 21325. kudos to smark for
+ # the idea of setting HOME.
+ TMPDIR="${T}" HOME="${T}/" perl-module_src_test
+}
+
+src_install() {
+ apache-module_src_install
+
+ default
+#emake DESTDIR="${D}" install || die
+
+ # TODO: add some stuff from docs/ back?
+
+ # rendhalver - fix the perllocal.pod that gets installed
+ # it seems to me that this has been getting installed for ages
+ perl_delete_localpod
+ # Remove empty .bs files as well
+ perl_delete_packlist
+
+ insinto "${APACHE_MODULES_CONFDIR}"
+ doins "${FILESDIR}"/2.0.3/apache2-mod_perl-startup.pl
+
+ # this is an attempt to get @INC in line with /usr/bin/perl.
+ # there is blib garbage in the mainstream one that can only be
+ # useful during internal testing, so we wait until here and then
+ # just go with a clean slate. should be much easier to see what's
+ # happening and revert if problematic.
+
+ # Sorry for this evil hack...
+ perl_set_version # just to be sure...
+ sed -i \
+ -e "s,-I${S}/[^[:space:]\"\']\+[[:space:]]\?,,g" \
+ -e "s,-typemap[[:space:]]${S}/[^[:space:]\"\']\+[[:space:]]\?,,g" \
+ -e "s,${S}\(/[^[:space:]\"\']\+\)\?,/,g" \
+ "${D}/${VENDOR_ARCH}/Apache2/BuildConfig.pm" || die
+
+ for fname in $(find "${D}" -type f -not -name '*.so'); do
+ grep -q "\(${D}\|${S}\)" "${fname}" && ewarn "QA: File contains a temporary path ${fname}"
+ sed -i -e "s:\(${D}\|${S}\):/:g" ${fname}
+ done
+ # All the rest
+ perl_remove_temppath
+}
+
+pkg_postinst() {
+ apache-module_pkg_postinst
+}
diff --git a/www-apache/mod_perl/mod_perl-2.0.8.ebuild b/www-apache/mod_perl/mod_perl-2.0.8.ebuild
new file mode 100644
index 000000000000..c605774efabe
--- /dev/null
+++ b/www-apache/mod_perl/mod_perl-2.0.8.ebuild
@@ -0,0 +1,157 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit depend.apache apache-module perl-module eutils
+
+DESCRIPTION="An embedded Perl interpreter for Apache2"
+SRC_URI="mirror://apache/perl/${P}.tar.gz"
+HOMEPAGE="https://projects.apache.org/projects/mod_perl.html"
+
+LICENSE="GPL-2"
+KEYWORDS="alpha amd64 ~hppa ia64 ppc ppc64 sparc x86"
+IUSE="debug"
+SLOT="1"
+
+# Make sure we always use the latest Apache-Test version or even check the
+# version of the bundled Apache-Test!
+#
+# We need both, apache and perl but either apache without threads or perl with
+# ithreads, bug 373943
+DEPEND="<www-servers/apache-2.4
+ >=dev-perl/Apache-Test-1.360
+ >=dev-perl/CGI-3.08
+ dev-lang/perl
+ www-servers/apache
+ || ( www-servers/apache[-threads] dev-lang/perl[ithreads] )"
+RDEPEND="${DEPEND}"
+PDEPEND=">=dev-perl/Apache-Reload-0.11
+ >=dev-perl/Apache-SizeLimit-0.95"
+
+APACHE2_MOD_FILE="${S}/src/modules/perl/mod_perl.so"
+APACHE2_MOD_CONF="2.0.3/75_${PN}.2.2"
+APACHE2_MOD_DEFINE="PERL"
+
+SRC_TEST="do"
+
+DOCFILES="Changes INSTALL README STATUS"
+
+need_apache2
+
+src_prepare() {
+ perl-module_src_prepare
+
+ # I am not entirely happy with this solution, but here's what's
+ # going on here if someone wants to take a stab at another
+ # approach. When userpriv compilation is off, then the make
+ # process drops to user "nobody" to run the test servers. This
+ # server is closed, and then the socket is rebound using
+ # SO_REUSEADDR. If the same user does this, there is no problem,
+ # and the socket may be rebound immediately. If a different user
+ # (yes, in my testing, even root) attempts to rebind, it fails.
+ # Since the "is the socket available yet" code and the
+ # second-batch bind call both run as root, this will fail.
+
+ # The upstream settings on my test machine cause the second batch
+ # of tests to fail, believing the socket to still be in use. I
+ # tried patching various parts to make them run as the user
+ # specified in $config->{vars}{user} using getpwnam, but found
+ # this patch to be fairly intrusive, because the userid must be
+ # restored and the patch must be applied to multiple places.
+
+ # For now, we will simply extend the timeout in hopes that in the
+ # non-userpriv case, the socket will clear from the kernel tables
+ # normally, and the tests will proceed.
+
+ # If anybody is still having problems, then commenting out "make
+ # test" below should allow the software to build properly.
+
+ # Robert Coie <rac@gentoo.org> 2003.05.06
+# sed -i -e "s/sleep \$_/sleep \$_ << 2/" \
+# "${S}"/Apache-Test/lib/Apache/TestServer.pm \
+# || die "problem editing TestServer.pm"
+
+ # rendhalver - this got redone for 2.0.1 and seems to fix the make test problems
+ epatch "${FILESDIR}"/mod_perl-2.0.1-sneak-tmpdir.patch
+
+ # bug 352724
+ epatch "${FILESDIR}/${P}-bundled-Apache-Test.patch"
+ rm -rf Apache-{Test,Reload,SizeLimit}/ lib/Bundle/
+ sed -i -e 's:^Apache-\(Reload\|SizeLimit\|Test\).*::' \
+ -e 's:^lib/Bundle/Apache2.pm::' MANIFEST || die
+}
+
+src_configure() {
+ local myargs=
+
+ if use debug; then
+ myargs="MP_TRACE=1 MP_DEBUG=1"
+ else
+ myargs="MP_TRACE=0 MP_DEBUG=0"
+ fi
+
+ perl Makefile.PL \
+ PREFIX="${EPREFIX}"/usr \
+ INSTALLDIRS=vendor \
+ MP_USE_DSO=1 \
+ MP_APXS=${APXS} \
+ ${myargs} || die
+}
+
+src_test() {
+ # make test notes whether it is running as root, and drops
+ # privileges all the way to "nobody" if so, so we must adjust
+ # write permissions accordingly in this case.
+
+ # IF YOU SUDO TO EMERGE AND HAVE !env_reset set testing will fail!
+ if [[ "$(id -u)" == "0" ]]; then
+ chown nobody:nobody "${WORKDIR}"
+ chown nobody:nobody "${T}"
+ fi
+
+ # this does not || die because of bug 21325. kudos to smark for
+ # the idea of setting HOME.
+ TMPDIR="${T}" HOME="${T}/" perl-module_src_test
+}
+
+src_install() {
+ apache-module_src_install
+
+ emake DESTDIR="${D}" install || die
+
+ # TODO: add some stuff from docs/ back?
+
+ # rendhalver - fix the perllocal.pod that gets installed
+ # it seems to me that this has been getting installed for ages
+ perl_delete_localpod
+ # Remove empty .bs files as well
+ perl_delete_packlist
+
+ insinto "${APACHE_MODULES_CONFDIR}"
+ doins "${FILESDIR}"/2.0.3/apache2-mod_perl-startup.pl || die
+
+ # this is an attempt to get @INC in line with /usr/bin/perl.
+ # there is blib garbage in the mainstream one that can only be
+ # useful during internal testing, so we wait until here and then
+ # just go with a clean slate. should be much easier to see what's
+ # happening and revert if problematic.
+
+ # Sorry for this evil hack...
+ perl_set_version # just to be sure...
+ sed -i -e "s,-I${S}/[^[:space:]\"\']\+[[:space:]]\?,,g" \
+ -e "s,-typemap[[:space:]]${S}/[^[:space:]\"\']\+[[:space:]]\?,,g" \
+ -e "s,${S}\(/[^[:space:]\"\']\+\)\?,/,g" "${D}/${VENDOR_ARCH}/Apache2/BuildConfig.pm" || die
+
+ for fname in $(find "${D}" -type f -not -name '*.so'); do
+ grep -q "\(${D}\|${S}\)" "${fname}" && ewarn "QA: File contains a temporary path ${fname}"
+ sed -i -e "s:\(${D}\|${S}\):/:g" ${fname}
+ done
+ # All the rest
+ perl_remove_temppath
+}
+
+pkg_postinst() {
+ apache-module_pkg_postinst
+}
diff --git a/www-apache/mod_proxy_fcgi/Manifest b/www-apache/mod_proxy_fcgi/Manifest
new file mode 100644
index 000000000000..1ba6a0f7de1d
--- /dev/null
+++ b/www-apache/mod_proxy_fcgi/Manifest
@@ -0,0 +1 @@
+DIST mod_proxy_fcgi-0_p816361.tar.bz2 7900 SHA256 bfe64ad32e568df550a2df0e0e34ca261e573c8dad81bcf5c40dc9dcce3d6a4c SHA512 e9773b5a76c6820f6949944a8984b16521c635289cf08e9dc123f2390c57ff3c726d139301bcf7c1354e49ecca030341572699f3e8ec47e26e5389fa7dbcfab9 WHIRLPOOL 5f15ecde54ec2da62cfcc982165bf9d3ee85ee5d2d5894585c9df0905870f732a4d2744c3cb28d6c39b702b266f35b9b60c412f31e873e331550bd081183d7fa
diff --git a/www-apache/mod_proxy_fcgi/files/36_mod_proxy_fcgi.conf b/www-apache/mod_proxy_fcgi/files/36_mod_proxy_fcgi.conf
new file mode 100644
index 000000000000..a4634a12d375
--- /dev/null
+++ b/www-apache/mod_proxy_fcgi/files/36_mod_proxy_fcgi.conf
@@ -0,0 +1,3 @@
+<IfDefine PROXY_FCGI>
+LoadModule proxy_fcgi_module modules/mod_proxy_fcgi.so
+</IfDefine>
diff --git a/www-apache/mod_proxy_fcgi/metadata.xml b/www-apache/mod_proxy_fcgi/metadata.xml
new file mode 100644
index 000000000000..4538a68724a6
--- /dev/null
+++ b/www-apache/mod_proxy_fcgi/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer><email>maintainer-needed@gentoo.org</email></maintainer>
+</pkgmetadata>
diff --git a/www-apache/mod_proxy_fcgi/mod_proxy_fcgi-0_p816361.ebuild b/www-apache/mod_proxy_fcgi/mod_proxy_fcgi-0_p816361.ebuild
new file mode 100644
index 000000000000..97ca8e9f2b74
--- /dev/null
+++ b/www-apache/mod_proxy_fcgi/mod_proxy_fcgi-0_p816361.ebuild
@@ -0,0 +1,22 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit apache-module
+
+DESCRIPTION="mod_proxy_fcgi is a FastCGI protocol handler for mod_proxy"
+HOMEPAGE="http://httpd.apache.org"
+SRC_URI="http://dev.gentoo.org/~hollow/distfiles/${P}.tar.bz2"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND=""
+
+APACHE2_MOD_CONF="36_${PN}"
+APACHE2_MOD_DEFINE="PROXY_FCGI"
+
+need_apache2_2
diff --git a/www-apache/mod_proxy_html/Manifest b/www-apache/mod_proxy_html/Manifest
new file mode 100644
index 000000000000..e447b9639d9d
--- /dev/null
+++ b/www-apache/mod_proxy_html/Manifest
@@ -0,0 +1 @@
+DIST mod_proxy_html-3.1.2.tar.bz2 23019 SHA256 a1aee758bda605e153868b91188ebf2c527b8eeb0f115d11af152078e65895bf SHA512 dc56c9abcaa3760b4ac5157ddb83d5ec29f1f60fa6c16dbadf55c81e27dadd6d25bcc0bbcd874bce8bce43d91650186201b37cd36fe50d625a051a1bd9c4a9a7 WHIRLPOOL 111fa49739002770f08446c4e7f49621b03c5ecb909559ac00165f10c720896e54dce7e97d6fa124a54d1226e08e8d4f1086c623b789b7bd60f5eb082c2934f2
diff --git a/www-apache/mod_proxy_html/files/27_mod_proxy_html.conf b/www-apache/mod_proxy_html/files/27_mod_proxy_html.conf
new file mode 100644
index 000000000000..94cb19c203fc
--- /dev/null
+++ b/www-apache/mod_proxy_html/files/27_mod_proxy_html.conf
@@ -0,0 +1,49 @@
+<IfDefine PROXY_HTML>
+LoadFile /usr/lib/libxml2.so
+LoadModule proxy_html_module modules/mod_proxy_html.so
+
+# All knowledge of HTML links has been removed from the mod_proxy_html
+# code itself, and is instead read from httpd.conf (or included file)
+# at server startup. So you MUST declare it. This will normally be
+# at top level, but can also be used in a <Location>.
+#
+# Here's the declaration for W3C HTML 4.01 and XHTML 1.0
+
+ProxyHTMLLinks a href
+ProxyHTMLLinks area href
+ProxyHTMLLinks link href
+ProxyHTMLLinks img src longdesc usemap
+ProxyHTMLLinks object classid codebase data usemap
+ProxyHTMLLinks q cite
+ProxyHTMLLinks blockquote cite
+ProxyHTMLLinks ins cite
+ProxyHTMLLinks del cite
+ProxyHTMLLinks form action
+ProxyHTMLLinks input src usemap
+ProxyHTMLLinks head profile
+ProxyHTMLLinks base href
+ProxyHTMLLinks script src for
+
+# To support scripting events (with ProxyHTMLExtended On),
+# you'll need to declare them too.
+
+ProxyHTMLEvents onclick ondblclick onmousedown onmouseup \
+ onmouseover onmousemove onmouseout onkeypress \
+ onkeydown onkeyup onfocus onblur onload \
+ onunload onsubmit onreset onselect onchange
+
+# If you need to support legacy (pre-1998, aka "transitional") HTML or XHTML,
+# you'll need to uncomment the following deprecated link attributes.
+#
+# ProxyHTMLLinks frame src longdesc
+# ProxyHTMLLinks iframe src longdesc
+# ProxyHTMLLinks body background
+# ProxyHTMLLinks applet codebase
+#
+# If you're dealing with proprietary HTML variants,
+# declare your own URL attributes here as required.
+#
+# ProxyHTMLLinks myelement myattr otherattr
+</IfDefine>
+
+# vim: ts=4 filetype=apache
diff --git a/www-apache/mod_proxy_html/metadata.xml b/www-apache/mod_proxy_html/metadata.xml
new file mode 100644
index 000000000000..4538a68724a6
--- /dev/null
+++ b/www-apache/mod_proxy_html/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer><email>maintainer-needed@gentoo.org</email></maintainer>
+</pkgmetadata>
diff --git a/www-apache/mod_proxy_html/mod_proxy_html-3.1.2.ebuild b/www-apache/mod_proxy_html/mod_proxy_html-3.1.2.ebuild
new file mode 100644
index 000000000000..42e67af65fc3
--- /dev/null
+++ b/www-apache/mod_proxy_html/mod_proxy_html-3.1.2.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit apache-module
+
+DESCRIPTION="An Apache2 module to rewrite links in html pages behind a reverse proxy"
+HOMEPAGE="http://apache.webthing.com/mod_proxy_html/"
+SRC_URI="http://apache.webthing.com/mod_proxy_html/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+DEPEND="app-arch/bzip2
+ dev-libs/libxml2
+ >=www-apache/mod_xml2enc-1.0.3"
+RDEPEND="${DEPEND}"
+
+APACHE2_MOD_CONF="27_${PN}"
+APACHE2_MOD_DEFINE="PROXY_HTML"
+
+need_apache2
+
+S="${WORKDIR}"/${PN}
+
+src_compile() {
+ APXS2_ARGS="$(xml2-config --cflags) -I"${WORKDIR}/${PN}" -c ${PN}.c"
+ apache-module_src_compile
+}
diff --git a/www-apache/mod_python/Manifest b/www-apache/mod_python/Manifest
new file mode 100644
index 000000000000..5b2f8601a558
--- /dev/null
+++ b/www-apache/mod_python/Manifest
@@ -0,0 +1 @@
+DIST mod_python-3.5.0.tgz 571403 SHA256 0ef09058ed98b41c18d899d8b710a0cce2df2b53c44d877401133b3f28bdca90 SHA512 a8838c807db36bd316e44c43c1b1db6d6565a30d1823664f3d44667f5843274ff5f77a849fcfa226fcfb6d399ef2dd983939ff0f6db8849a3e7d25ceafe0c765 WHIRLPOOL 677db711d64d7519eca27890e865cbf773f97253b0ff97b1192b9b8a89c1427c3906b6ba5fa1fcfe146ee5c5d5afc25c141b80119df3741a80db160b0b7a64c8
diff --git a/www-apache/mod_python/files/16_mod_python.conf b/www-apache/mod_python/files/16_mod_python.conf
new file mode 100644
index 000000000000..9fbe3624a003
--- /dev/null
+++ b/www-apache/mod_python/files/16_mod_python.conf
@@ -0,0 +1,33 @@
+<IfDefine PYTHON>
+LoadModule python_module modules/mod_python.so
+
+# Mod_python is a module that embeds the Python language interpreter
+# within the server, allowing Apache handlers to be written in Python.
+
+# This will cause files beneath /home/httpd/htdocs with the extension .spam
+# to be handled by the Python script /home/httpd/htdocs/eggs.py
+#
+#<Directory /home/httpd/htdocs>
+# AddHandler python-program .spam
+# PythonHandler eggs
+#</Directory>
+
+# This will cause all requests to the /python heirachy of your
+# webserver to be handled by the python script /path/to/myhandler.py
+#
+#<Location /python>
+# SetHandler python-program
+# PythonPath "sys.path + ['/path/to']"
+# PythonHandler myhandler
+#</Location>
+
+# This will cause all requests to the /python heirachy of your
+# webserver to be handled by mod_python's Publisher handler
+#
+#<Location /python>
+# SetHandler python-program
+# PythonHandler mod_python.publisher
+#</Location>
+</IfDefine>
+
+# vim: ts=4 filetype=apache
diff --git a/www-apache/mod_python/files/mod_python-3.5.0-buildsystem.patch b/www-apache/mod_python/files/mod_python-3.5.0-buildsystem.patch
new file mode 100644
index 000000000000..5941a5016857
--- /dev/null
+++ b/www-apache/mod_python/files/mod_python-3.5.0-buildsystem.patch
@@ -0,0 +1,35 @@
+--- mod_python-3.5.0/scripts/Makefile.in
++++ mod_python-3.5.0/scripts/Makefile.in
+@@ -26,4 +26,5 @@
+ rm -f Makefile
+
+ install:
++ $(INSTALL) -d $(DESTDIR)$(BINDIR)
+ $(INSTALL) -m 0755 mod_python $(DESTDIR)$(BINDIR)/mod_python
+--- mod_python-3.5.0/dist/Makefile.in
++++ mod_python-3.5.0/dist/Makefile.in
+@@ -34,9 +34,9 @@
+ install_py_lib: mod_python src
+ @cd src; $(MAKE) psp_parser.c
+ if test -z "$(DESTDIR)" ; then \
+- $(PYTHON_BIN) setup.py install --optimize 2 --force ; \
++ $(PYTHON_BIN) setup.py install --no-compile --force ; \
+ else \
+- $(PYTHON_BIN) setup.py install --optimize 2 --force --root $(DESTDIR) ; \
++ $(PYTHON_BIN) setup.py install --no-compile --force --root $(DESTDIR) ; \
+ fi
+
+ mod_python.so:
+--- mod_python-3.5.0/Makefile.in
++++ mod_python-3.5.0/Makefile.in
+@@ -31,8 +31,8 @@
+ dso: @DSO@
+
+ do_dso:
+- @cd src && $(MAKE)
+- @cd dist && $(MAKE) build
++ cd src && $(MAKE)
++ cd dist && $(MAKE) build
+ @echo
+ @echo 'Now run sudo make install'
+ @echo ' (or, if you only want to perform a partial install,'
diff --git a/www-apache/mod_python/metadata.xml b/www-apache/mod_python/metadata.xml
new file mode 100644
index 000000000000..3ebe14c49028
--- /dev/null
+++ b/www-apache/mod_python/metadata.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>xmw@gentoo.org</email>
+ <name>Michael Weber</name>
+ </maintainer>
+ <longdescription>
+ Mod_python is an Apache module that embeds the Python interpreter within
+ the server. With mod_python you can write web-based applications in Python
+ that will run many times faster than traditional CGI and will have access
+ to advanced features such as ability to retain database connections and
+ other data between hits and access to Apache internals.
+ </longdescription>
+ <longdescription lang="ja">
+ Mod_PythonはウェブサーバーにPythonインタープリタを埋め込むApacheモジュールです。
+ Mod_PythonはPython言語のウェブベース・アプリケーションを従来のCGIよりも何倍も高>
+ 速に走らせることができ、データデータベースのコネクション保持に関するより高度なア
+ クセス機能やヒット間の他のデータやApache内部へのアクセス機能を持ちます。
+ </longdescription>
+</pkgmetadata>
diff --git a/www-apache/mod_python/mod_python-3.5.0.ebuild b/www-apache/mod_python/mod_python-3.5.0.ebuild
new file mode 100644
index 000000000000..ca7af1523b57
--- /dev/null
+++ b/www-apache/mod_python/mod_python-3.5.0.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 python3_3 python3_4 )
+
+inherit apache-module eutils python-single-r1
+
+DESCRIPTION="An Apache2 module providing an embedded Python interpreter"
+HOMEPAGE="http://modpython.org/"
+SRC_URI="http://dist.modpython.org/dist/${P}.tgz"
+
+LICENSE="Apache-2.0"
+KEYWORDS="alpha amd64 ia64 ~mips ppc sparc x86"
+IUSE="doc test"
+SLOT="0"
+
+APACHE2_MOD_CONF="16_${PN}"
+APACHE2_MOD_DEFINE="PYTHON"
+need_apache2
+
+RDEPEND="${RDEPEND}"
+DEPEND="${DEPEND}
+ test? (
+ app-admin/apache-tools
+ net-misc/curl
+ )"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-buildsystem.patch
+
+ export CFLAGS="$(apxs2 -q CFLAGS)"
+ export LDFLAGS="$(apxs2 -q LDFLAGS)"
+}
+
+src_compile() {
+ default
+}
+
+src_test() {
+ cd test || die
+ PYTHONPATH="$(ls -d ${S}/dist/build/lib.*)" ${PYTHON} test.py || die
+}
+
+src_install() {
+ default
+
+ use doc && dohtml -r doc-html/*
+
+ apache-module_src_install
+}
diff --git a/www-apache/mod_qos/Manifest b/www-apache/mod_qos/Manifest
new file mode 100644
index 000000000000..c707bab1192c
--- /dev/null
+++ b/www-apache/mod_qos/Manifest
@@ -0,0 +1 @@
+DIST mod_qos-11.12.tar.gz 509530 SHA256 decbf82bb48568bd2fc5ca96792d294c3fbf5b950b338df8670237cc2144c6d5 SHA512 a9597a1b7ec38ec9ad492c79b797a807e180feb11a42cf7e206ca3cecf9c986eecc9979659a65fcc9ec0454ef8574dbdfc2c5abd862d8b3bc1065a93fbe0ccb7 WHIRLPOOL fabbe758c5fb6f069a4e510889f7fddf5eff23a0395e1976336c1a6d4fe411fe1c83f175dc65a0e6e9e47bd119eb1f195885f131229060fe32dc025ab0c0d256
diff --git a/www-apache/mod_qos/files/10_mod_qos.conf b/www-apache/mod_qos/files/10_mod_qos.conf
new file mode 100644
index 000000000000..4a8eeca1b6ee
--- /dev/null
+++ b/www-apache/mod_qos/files/10_mod_qos.conf
@@ -0,0 +1,5 @@
+<IfDefine QOS>
+LoadModule qos_module modules/mod_qos.so
+</IfDefine>
+
+# vim: ts=4 filetype=apache
diff --git a/www-apache/mod_qos/metadata.xml b/www-apache/mod_qos/metadata.xml
new file mode 100644
index 000000000000..e2ea7e60fd8a
--- /dev/null
+++ b/www-apache/mod_qos/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>maintainer-needed@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">mod-qos</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/www-apache/mod_qos/mod_qos-11.12.ebuild b/www-apache/mod_qos/mod_qos-11.12.ebuild
new file mode 100644
index 000000000000..c4bee3d01245
--- /dev/null
+++ b/www-apache/mod_qos/mod_qos-11.12.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+inherit autotools apache-module
+
+DESCRIPTION="A QOS module for the apache webserver"
+HOMEPAGE="http://mod-qos.sourceforge.net/"
+SRC_URI="mirror://sourceforge/mod-qos/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="
+ dev-libs/libpcre
+ dev-libs/openssl:0
+ media-libs/libpng:0=
+ sys-libs/zlib
+"
+DEPEND="${DEPEND}"
+
+APXS2_S="${S}/apache2"
+APACHE2_MOD_CONF="10_${PN}"
+APACHE2_MOD_DEFINE="QOS"
+DOCFILES="${S}/doc/*.txt ${S}/README.TXT"
+
+need_apache2
+
+src_prepare() {
+ cd "${S}/tools" && eautoreconf
+}
+
+src_configure() {
+ cd "${S}/tools" && econf
+}
+
+src_compile() {
+ apache-module_src_compile
+ emake -C "${S}/tools"
+}
+
+src_install() {
+ einfo "Installing Apache module ..."
+ cd "${S}/tools"
+ apache-module_src_install
+
+ einfo "Installing module utilities ..."
+ emake -C "${S}/tools" install DESTDIR="${D}"
+
+ # installing html documentation
+ dohtml -r -x *.txt "${S}/doc/"
+}
diff --git a/www-apache/mod_rpaf/Manifest b/www-apache/mod_rpaf/Manifest
new file mode 100644
index 000000000000..ed44479f4b37
--- /dev/null
+++ b/www-apache/mod_rpaf/Manifest
@@ -0,0 +1 @@
+DIST mod_rpaf-0.6.tar.gz 7695 SHA256 80f9dd1b0574747ef2c399335a88cf562491a7f0b940f26c684d065fe6c4c27d SHA512 1ad5af69cfe0e72cc609c081388e20e6a40cff1af7b47581b3d6958e5c7badf6580b2e14e5bd86482fe7cc7b60ca5045a2486c6f3f6e8ece7c142d38df990b4c WHIRLPOOL c0f9a8d9a561e963bf043efb64f99a8e87a7d1c704c78580c467321044abd9adda9b2c13437a4bbec8508920a18da801e1e6f4e19d03453aaf277215c074fb5a
diff --git a/www-apache/mod_rpaf/files/003_ipv6.patch b/www-apache/mod_rpaf/files/003_ipv6.patch
new file mode 100644
index 000000000000..67edd55e45aa
--- /dev/null
+++ b/www-apache/mod_rpaf/files/003_ipv6.patch
@@ -0,0 +1,31 @@
+Description: ipv6 fixes
+Author: Piotr Roszatycki <dexter@debian.org>
+Reviewed-by: Sergey B Kirpichev <skirpichev@gmail.com>
+Bug-Debian: http://bugs.debian.org/726529
+
+---
+ mod_rpaf-2.0.c | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+--- a/mod_rpaf-2.0.c
++++ b/mod_rpaf-2.0.c
+@@ -72,6 +72,8 @@
+ #include "http_vhost.h"
+ #include "apr_strings.h"
+
++#include <arpa/inet.h>
++
+ module AP_MODULE_DECLARE_DATA rpaf_module;
+
+ typedef struct {
+@@ -185,6 +187,10 @@
+ apr_pool_cleanup_register(r->pool, (void *)rcr, rpaf_cleanup, apr_pool_cleanup_null);
+ r->connection->remote_ip = apr_pstrdup(r->connection->pool, ((char **)arr->elts)[((arr->nelts)-1)]);
+ r->connection->remote_addr->sa.sin.sin_addr.s_addr = apr_inet_addr(r->connection->remote_ip);
++ apr_sockaddr_t *tmpsa;
++ int ret = apr_sockaddr_info_get(&tmpsa, r->connection->remote_ip, APR_UNSPEC, r->connection->remote_addr->port, 0, r->connection->remote_addr->pool);
++ if (ret == APR_SUCCESS)
++ memcpy(r->connection->remote_addr, tmpsa, sizeof(apr_sockaddr_t));
+ if (cfg->sethostname) {
+ const char *hostvalue;
+ if (hostvalue = apr_table_get(r->headers_in, "X-Forwarded-Host")) {
diff --git a/www-apache/mod_rpaf/files/010_multiple_proxies.patch b/www-apache/mod_rpaf/files/010_multiple_proxies.patch
new file mode 100644
index 000000000000..2c9fae01bbe3
--- /dev/null
+++ b/www-apache/mod_rpaf/files/010_multiple_proxies.patch
@@ -0,0 +1,37 @@
+Description: Use the last value from the X-Forwarded-For header, which
+ is not in RPAFproxy_ips as the client IP, falling back to the first one
+ if they are all known proxies.
+Author: Dagfinn Ilmari Mannsåker <ilmari@ilmari.org>
+
+---
+ mod_rpaf-2.0.c | 12 +++++++++++-
+ 1 file changed, 11 insertions(+), 1 deletion(-)
+
+--- a/mod_rpaf-2.0.c
++++ b/mod_rpaf-2.0.c
+@@ -154,6 +154,16 @@
+ return APR_SUCCESS;
+ }
+
++static char* last_not_in_array(apr_array_header_t *forwarded_for,
++ apr_array_header_t *proxy_ips) {
++ int i;
++ for (i = (forwarded_for->nelts)-1; i > 0; i--) {
++ if (!is_in_array(((char **)forwarded_for->elts)[i], proxy_ips))
++ break;
++ }
++ return ((char **)forwarded_for->elts)[i];
++}
++
+ static int change_remote_ip(request_rec *r) {
+ const char *fwdvalue;
+ char *val;
+@@ -185,7 +195,7 @@
+ rcr->old_ip = apr_pstrdup(r->connection->pool, r->connection->remote_ip);
+ rcr->r = r;
+ apr_pool_cleanup_register(r->pool, (void *)rcr, rpaf_cleanup, apr_pool_cleanup_null);
+- r->connection->remote_ip = apr_pstrdup(r->connection->pool, ((char **)arr->elts)[((arr->nelts)-1)]);
++ r->connection->remote_ip = apr_pstrdup(r->connection->pool, last_not_in_array(arr, cfg->proxy_ips));
+ r->connection->remote_addr->sa.sin.sin_addr.s_addr = apr_inet_addr(r->connection->remote_ip);
+ apr_sockaddr_t *tmpsa;
+ int ret = apr_sockaddr_info_get(&tmpsa, r->connection->remote_ip, APR_UNSPEC, r->connection->remote_addr->port, 0, r->connection->remote_addr->pool);
diff --git a/www-apache/mod_rpaf/files/011_apache2.4.patch b/www-apache/mod_rpaf/files/011_apache2.4.patch
new file mode 100644
index 000000000000..1757e9f30a5a
--- /dev/null
+++ b/www-apache/mod_rpaf/files/011_apache2.4.patch
@@ -0,0 +1,51 @@
+Description: Apache 2.4 compatibility patch
+Author: Sergey B Kirpichev <skirpichev@gmail.com>
+Bug-Debian: http://bugs.debian.org/666792
+
+---
+ mod_rpaf-2.0.c | 16 ++++++++--------
+ 1 file changed, 8 insertions(+), 8 deletions(-)
+
+--- a/mod_rpaf-2.0.c
++++ b/mod_rpaf-2.0.c
+@@ -149,8 +149,8 @@
+
+ static apr_status_t rpaf_cleanup(void *data) {
+ rpaf_cleanup_rec *rcr = (rpaf_cleanup_rec *)data;
+- rcr->r->connection->remote_ip = apr_pstrdup(rcr->r->connection->pool, rcr->old_ip);
+- rcr->r->connection->remote_addr->sa.sin.sin_addr.s_addr = apr_inet_addr(rcr->r->connection->remote_ip);
++ rcr->r->connection->client_ip = apr_pstrdup(rcr->r->connection->pool, rcr->old_ip);
++ rcr->r->connection->client_addr->sa.sin.sin_addr.s_addr = apr_inet_addr(rcr->r->connection->client_ip);
+ return APR_SUCCESS;
+ }
+
+@@ -173,7 +173,7 @@
+ if (!cfg->enable)
+ return DECLINED;
+
+- if (is_in_array(r->connection->remote_ip, cfg->proxy_ips) == 1) {
++ if (is_in_array(r->connection->client_ip, cfg->proxy_ips) == 1) {
+ /* check if cfg->headername is set and if it is use
+ that instead of X-Forwarded-For by default */
+ if (cfg->headername && (fwdvalue = apr_table_get(r->headers_in, cfg->headername))) {
+@@ -192,15 +192,15 @@
+ if (*fwdvalue != '\0')
+ ++fwdvalue;
+ }
+- rcr->old_ip = apr_pstrdup(r->connection->pool, r->connection->remote_ip);
++ rcr->old_ip = apr_pstrdup(r->connection->pool, r->connection->client_ip);
+ rcr->r = r;
+ apr_pool_cleanup_register(r->pool, (void *)rcr, rpaf_cleanup, apr_pool_cleanup_null);
+- r->connection->remote_ip = apr_pstrdup(r->connection->pool, last_not_in_array(arr, cfg->proxy_ips));
+- r->connection->remote_addr->sa.sin.sin_addr.s_addr = apr_inet_addr(r->connection->remote_ip);
++ r->connection->client_ip = apr_pstrdup(r->connection->pool, last_not_in_array(arr, cfg->proxy_ips));
++ r->connection->client_addr->sa.sin.sin_addr.s_addr = apr_inet_addr(r->connection->client_ip);
+ apr_sockaddr_t *tmpsa;
+- int ret = apr_sockaddr_info_get(&tmpsa, r->connection->remote_ip, APR_UNSPEC, r->connection->remote_addr->port, 0, r->connection->remote_addr->pool);
++ int ret = apr_sockaddr_info_get(&tmpsa, r->connection->client_ip, APR_UNSPEC, r->connection->client_addr->port, 0, r->connection->client_addr->pool);
+ if (ret == APR_SUCCESS)
+- memcpy(r->connection->remote_addr, tmpsa, sizeof(apr_sockaddr_t));
++ memcpy(r->connection->client_addr, tmpsa, sizeof(apr_sockaddr_t));
+ if (cfg->sethostname) {
+ const char *hostvalue;
+ if (hostvalue = apr_table_get(r->headers_in, "X-Forwarded-Host")) {
diff --git a/www-apache/mod_rpaf/files/012_Add-missing-header-for-inet_addr.patch b/www-apache/mod_rpaf/files/012_Add-missing-header-for-inet_addr.patch
new file mode 100644
index 000000000000..250a23bf918e
--- /dev/null
+++ b/www-apache/mod_rpaf/files/012_Add-missing-header-for-inet_addr.patch
@@ -0,0 +1,17 @@
+Description: Add missing header for inet_addr
+Author: Sergey B Kirpichev <skirpichev@gmail.com>
+
+---
+ mod_rpaf-2.0.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/mod_rpaf-2.0.c
++++ b/mod_rpaf-2.0.c
+@@ -64,6 +64,7 @@
+ *
+ */
+
++#include <arpa/inet.h>
+ #include "httpd.h"
+ #include "http_config.h"
+ #include "http_core.h"
diff --git a/www-apache/mod_rpaf/files/10_mod_rpaf.conf b/www-apache/mod_rpaf/files/10_mod_rpaf.conf
new file mode 100644
index 000000000000..56c952ffaeb6
--- /dev/null
+++ b/www-apache/mod_rpaf/files/10_mod_rpaf.conf
@@ -0,0 +1,6 @@
+<IfDefine RPAF>
+LoadModule rpaf_module modules/mod_rpaf.so
+RPAFenable on
+</IfDefine>
+
+# vim: ts=4 filetype=apache
diff --git a/www-apache/mod_rpaf/metadata.xml b/www-apache/mod_rpaf/metadata.xml
new file mode 100644
index 000000000000..4538a68724a6
--- /dev/null
+++ b/www-apache/mod_rpaf/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer><email>maintainer-needed@gentoo.org</email></maintainer>
+</pkgmetadata>
diff --git a/www-apache/mod_rpaf/mod_rpaf-0.6-r1.ebuild b/www-apache/mod_rpaf/mod_rpaf-0.6-r1.ebuild
new file mode 100644
index 000000000000..8f91a5153bbc
--- /dev/null
+++ b/www-apache/mod_rpaf/mod_rpaf-0.6-r1.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit apache-module eutils
+
+DESCRIPTION="Reverse proxy add forward module"
+HOMEPAGE="http://stderr.net/apache/rpaf/"
+SRC_URI="http://stderr.net/apache/rpaf/download/${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND=""
+
+APACHE2_MOD_CONF="10_${PN}"
+APACHE2_MOD_DEFINE="RPAF"
+
+need_apache2_4
+
+src_prepare() {
+ # Debian patches
+ epatch "${FILESDIR}"/0*.patch
+ mv ${PN}-2.0.c ${PN}.c
+}
diff --git a/www-apache/mod_rpaf/mod_rpaf-0.6.ebuild b/www-apache/mod_rpaf/mod_rpaf-0.6.ebuild
new file mode 100644
index 000000000000..b039d2b30b06
--- /dev/null
+++ b/www-apache/mod_rpaf/mod_rpaf-0.6.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit apache-module
+
+DESCRIPTION="Reverse proxy add forward module"
+HOMEPAGE="http://stderr.net/apache/rpaf/"
+SRC_URI="http://stderr.net/apache/rpaf/download/${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND=""
+
+APACHE2_MOD_CONF="10_${PN}"
+APACHE2_MOD_DEFINE="RPAF"
+
+need_apache2_2
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ mv ${PN}-2.0.c ${PN}.c
+}
diff --git a/www-apache/mod_scgi/Manifest b/www-apache/mod_scgi/Manifest
new file mode 100644
index 000000000000..5dedcd1ad0ca
--- /dev/null
+++ b/www-apache/mod_scgi/Manifest
@@ -0,0 +1 @@
+DIST scgi-1.14.tar.gz 29406 SHA256 0cde41e4ae58ea666f17f6b1984e8ed8ebaff92cabac4b1b36f86bc47eb18e75 SHA512 148986aab3a5579b7dd7d15583990844149b799df32221b4d2c354b11361f79727087d63ddd54227d2aae937253997774e521606c7baea6b808b9efef025a01a WHIRLPOOL 969babed626fba1280f46eee7c620c9d42da1ffdabbf7752b849a26704f214773f07aae41849c873ba22f8bdc0c4c7f54455c130ec2992a943accfb328a183c5
diff --git a/www-apache/mod_scgi/files/20_mod_scgi.conf b/www-apache/mod_scgi/files/20_mod_scgi.conf
new file mode 100644
index 000000000000..1b7b5962748d
--- /dev/null
+++ b/www-apache/mod_scgi/files/20_mod_scgi.conf
@@ -0,0 +1,33 @@
+<IfDefine SCGI>
+LoadModule scgi_module modules/mod_scgi.so
+
+# Apache2 example
+#<Location "/dynamic">
+# SetHandler scgi-handler
+# SCGIServer localhost:4000
+# SCGIHandler On
+# Options -Multiviews
+#</Location>
+#<LocationMatch "^/(dynamic|login)($|/)">
+# SetHandler scgi-handler
+# SCGIServer localhost:4000
+# SCGIHandler On
+# Options -Multiviews
+#</Location>
+#<Location "/foo">
+# SCGIServer localhost:4000
+# SCGIHandler On
+# Options -Multiviews
+#</Location>
+#<Location "/bar">
+# SCGIServer localhost:4001
+# SCGIHandler On
+# SCGIServerTimeout 10
+# Options -Multiviews
+#</Location>
+#<Location "/bar/images">
+# SCGIHander Off
+#</Location>
+</IfDefine>
+
+# vim: ts=4 filetype=apache
diff --git a/www-apache/mod_scgi/files/mod_scgi-1.14-apache-2.4.patch b/www-apache/mod_scgi/files/mod_scgi-1.14-apache-2.4.patch
new file mode 100644
index 000000000000..8c1240b18c31
--- /dev/null
+++ b/www-apache/mod_scgi/files/mod_scgi-1.14-apache-2.4.patch
@@ -0,0 +1,49 @@
+--- a/apache2/mod_scgi.c
++++ b/apache2/mod_scgi.c
+@@ -135,16 +135,16 @@
+ return DECLINED;
+ }
+
+-static void log_err(const char *file, int line, request_rec *r,
++static void log_err(const char *file, int line, int index, request_rec *r,
+ apr_status_t status, const char *msg)
+ {
+- ap_log_rerror(file, line, APLOG_ERR, status, r, "scgi: %s", msg);
++ ap_log_rerror(file, line, index, APLOG_ERR, status, r, "scgi: %s", msg);
+ }
+
+-static void log_debug(const char *file, int line, request_rec *r, const
++static void log_debug(const char *file, int line, int index, request_rec *r, const
+ char *msg)
+ {
+- ap_log_rerror(file, line, APLOG_DEBUG, APR_SUCCESS, r, msg);
++ ap_log_rerror(file, line, index, APLOG_DEBUG, APR_SUCCESS, r, "%s", msg);
+ }
+
+ static char *http2env(apr_pool_t *p, const char *name)
+@@ -312,7 +312,7 @@
+ int i;
+ apr_status_t rv = 0;
+ apr_port_t port = 0;
+- GET_PORT(port, r->connection->remote_addr);
++ GET_PORT(port, r->useragent_addr);
+
+ log_debug(APLOG_MARK,r, "sending headers");
+ t = apr_table_make(r->pool, 40);
+@@ -324,14 +324,14 @@
+ buf = "0";
+ add_header(t, "CONTENT_LENGTH", buf);
+ add_header(t, "SCGI", SCGI_PROTOCOL_VERSION);
+- add_header(t, "SERVER_SOFTWARE", ap_get_server_version());
++ add_header(t, "SERVER_SOFTWARE", ap_get_server_banner());
+ add_header(t, "SERVER_PROTOCOL", r->protocol);
+ add_header(t, "SERVER_NAME", ap_get_server_name(r));
+ add_header(t, "SERVER_ADMIN", r->server->server_admin);
+ add_header(t, "SERVER_ADDR", r->connection->local_ip);
+ add_header(t, "SERVER_PORT", apr_psprintf(r->pool, "%u",
+ ap_get_server_port(r)));
+- add_header(t, "REMOTE_ADDR", r->connection->remote_ip);
++ add_header(t, "REMOTE_ADDR", r->useragent_ip);
+ add_header(t, "REMOTE_PORT", apr_psprintf(r->pool, "%d", port));
+ add_header(t, "REMOTE_USER", r->user);
+ add_header(t, "REQUEST_METHOD", r->method);
diff --git a/www-apache/mod_scgi/metadata.xml b/www-apache/mod_scgi/metadata.xml
new file mode 100644
index 000000000000..4538a68724a6
--- /dev/null
+++ b/www-apache/mod_scgi/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer><email>maintainer-needed@gentoo.org</email></maintainer>
+</pkgmetadata>
diff --git a/www-apache/mod_scgi/mod_scgi-1.14-r1.ebuild b/www-apache/mod_scgi/mod_scgi-1.14-r1.ebuild
new file mode 100644
index 000000000000..7a738c4c6430
--- /dev/null
+++ b/www-apache/mod_scgi/mod_scgi-1.14-r1.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit apache-module eutils
+
+DESCRIPTION="Apache module for a replacement of the CGI protocol, similar to FastCGI"
+HOMEPAGE="http://python.ca/scgi/ http://pypi.python.org/pypi/scgi"
+SRC_URI="http://python.ca/scgi/releases/scgi-${PV}.tar.gz"
+
+LICENSE="CNRI"
+SLOT="0"
+KEYWORDS="~amd64 ~hppa ~ppc ~x86"
+IUSE=""
+
+DEPEND="~www-apps/scgi-${PV}"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/scgi-${PV}"
+
+APXS2_S="${S}/apache2"
+APACHE2_MOD_FILE="${S}/apache2/.libs/${PN}.so"
+APACHE2_MOD_CONF="20_mod_scgi"
+APACHE2_MOD_DEFINE="SCGI"
+
+DOCFILES="PKG-INFO LICENSE.txt CHANGES.txt apache2/README.txt"
+
+need_apache2_4
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-apache-2.4.patch
+}
diff --git a/www-apache/mod_scgi/mod_scgi-1.14.ebuild b/www-apache/mod_scgi/mod_scgi-1.14.ebuild
new file mode 100644
index 000000000000..7427c41fb490
--- /dev/null
+++ b/www-apache/mod_scgi/mod_scgi-1.14.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="3"
+
+inherit apache-module
+
+DESCRIPTION="Apache module for a replacement of the CGI protocol, similar to FastCGI"
+HOMEPAGE="http://python.ca/scgi/ http://pypi.python.org/pypi/scgi"
+SRC_URI="http://python.ca/scgi/releases/scgi-${PV}.tar.gz"
+
+LICENSE="CNRI"
+SLOT="0"
+KEYWORDS="~amd64 hppa ~ppc x86"
+IUSE=""
+
+DEPEND="~www-apps/scgi-${PV}"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/scgi-${PV}"
+
+APXS2_S="${S}/apache2"
+APACHE2_MOD_FILE="${S}/apache2/.libs/${PN}.so"
+APACHE2_MOD_CONF="20_mod_scgi"
+APACHE2_MOD_DEFINE="SCGI"
+
+DOCFILES="PKG-INFO LICENSE.txt CHANGES.txt apache2/README.txt"
+
+need_apache2_2
diff --git a/www-apache/mod_security/Manifest b/www-apache/mod_security/Manifest
new file mode 100644
index 000000000000..d174741b1773
--- /dev/null
+++ b/www-apache/mod_security/Manifest
@@ -0,0 +1,3 @@
+DIST modsecurity-apache_2.7.4.tar.gz 1014983 SHA256 605d6f1b03e648001ef1c7db7b18d51c01edd443b57cbbd4e298770ffdcd0eb9 SHA512 5a3bc3e2845b05e33c43fd08458a91c5dfa37ecc8583abfd5bfdb52dbd405f1c6b8b9995ede22cb41eb42dce910dba657f298ba14a9d37addabde4b0ca02d5f2 WHIRLPOOL c83a92571469cde7aab960c56b96a082c68d9ad58f5ed549e08bf4e481147d0763b4c054d598ff509474d86048c048769bdc7c9e22669d957d2d28531fef96d7
+DIST modsecurity-apache_2.7.5.tar.gz 1045387 SHA256 9e907536278d8da80d3dbb29aeffe9c4ec37ce9b641035b2da64e993135647a2 SHA512 dd6d4b58c5abb7440d2b9a429a548485b5aebecf1859c93427bdcf30cdbc93c975e455f3f843cf82c4efdf2db06f6a43bf4db2bfdd84adabddeb5dabacedc141 WHIRLPOOL 4d71f3ae86ca1dda9d1547b140decde24ee5116733ecf86a0a95797e3ce9bf1e29cf42116a2a69b332132c3ad749fe5f18566bbe7dc6d60f47b378a0ef6d6cbc
+DIST modsecurity-apache_2.7.7.tar.gz 1003835 SHA256 11e05cfa6b363c2844c6412a40ff16f0021e302152b38870fd1f2f44b204379b SHA512 859f72580b6acaae5db180f98ee32ad2cb0f3ef24321d0c2df20ddd9fcfbc6c09c98b672012dc4931a6fd14f3c21c38ed31ab8900940382fcb48b37f30005a7d WHIRLPOOL e70f09c6bf640733696e6c544b4e37702ab05b043bdf07266a081316620986e976d2dcf8c1552380e846132473718b3ae7f0cadd18953b08b22bef5de3a5b455
diff --git a/www-apache/mod_security/files/modsecurity-2.7.conf b/www-apache/mod_security/files/modsecurity-2.7.conf
new file mode 100644
index 000000000000..43508bca635f
--- /dev/null
+++ b/www-apache/mod_security/files/modsecurity-2.7.conf
@@ -0,0 +1,15 @@
+<IfDefine SECURITY>
+LoadModule security2_module modules/mod_security2.so
+
+# Enable looking up geolocation data from MaxMind's GeoIP database
+SecGeoLookupDb /usr/share/GeoIP/GeoIP.dat
+
+SecDataDir /var/cache/modsecurity
+
+# Define here your http:BL API key if any
+# see http://www.projecthoneypot.org/httpbl_api.php
+#SecHttpBlKey xxxxxxxx
+</IfDefine>
+
+# -*- apache -*-
+# vim: ts=4 filetype=apache
diff --git a/www-apache/mod_security/metadata.xml b/www-apache/mod_security/metadata.xml
new file mode 100644
index 000000000000..5d1112092a64
--- /dev/null
+++ b/www-apache/mod_security/metadata.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>flameeyes@gentoo.org</email>
+ <name>Diego E. Pettenò</name>
+ </maintainer>
+ <use>
+ <flag name='geoip'>
+ Configure ModSecurity to query the GeoIP database from MaxMind,
+ provided by <pkg>dev-libs/geoip</pkg>. This flag only controls
+ the default configuration, as the GeoIP query code is part of
+ ModSecurity's source code.
+ </flag>
+
+ <flag name='curl'>
+ Build the ModSecurity Audit Log Collector (mlogc) that depends
+ on <pkg>net-misc/curl</pkg>.
+ </flag>
+
+ <flag name='jit'>
+ Add support for the PCRE Just-in-Time optimisation, as enabled
+ by <pkg>dev-libs/libpcre</pkg> with jit USE flag enabled. Might
+ not be available on hardened systems.
+ </flag>
+ </use>
+</pkgmetadata>
diff --git a/www-apache/mod_security/mod_security-2.7.4.ebuild b/www-apache/mod_security/mod_security-2.7.4.ebuild
new file mode 100644
index 000000000000..b19390883475
--- /dev/null
+++ b/www-apache/mod_security/mod_security-2.7.4.ebuild
@@ -0,0 +1,97 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit apache-module
+
+MY_PN=modsecurity-apache
+MY_PV=${PV/_rc/-rc}
+MY_P=${MY_PN}_${MY_PV}
+
+DESCRIPTION="Web application firewall and Intrusion Detection System for Apache"
+HOMEPAGE="http://www.modsecurity.org/"
+SRC_URI="http://www.modsecurity.org/tarball/${PV}/${MY_P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="amd64 ppc sparc x86"
+IUSE="geoip curl lua jit"
+
+DEPEND=">=dev-libs/libxml2-2.7.8
+ dev-libs/libpcre[jit?]
+ lua? ( >=dev-lang/lua-5.1 )
+ curl? ( >=net-misc/curl-7.15.1 )
+ www-servers/apache[apache2_modules_unique_id]"
+RDEPEND="${DEPEND}
+ geoip? ( dev-libs/geoip )"
+PDEPEND=">=www-apache/modsecurity-crs-2.2.6-r1"
+
+S="${WORKDIR}/${MY_P}"
+
+APACHE2_MOD_FILE="apache2/.libs/${PN}2.so"
+APACHE2_MOD_DEFINE="SECURITY"
+
+# Tests require symbols only defined within the Apache binary.
+RESTRICT=test
+
+need_apache2
+
+src_prepare() {
+ cp "${FILESDIR}"/modsecurity-2.7.conf "${T}"/79_modsecurity.conf || die
+}
+
+src_configure() {
+ econf \
+ --enable-shared --disable-static \
+ --with-apxs="${APXS}" \
+ --enable-request-early \
+ $(use_enable curl mlogc) \
+ $(use_with lua) \
+ $(use_enable jit pcre-jit)
+}
+
+src_compile() {
+ if ! use geoip; then
+ sed -i -e '/SecGeoLookupDb/s:^:#:' \
+ "${T}"/79_modsecurity.conf || die
+ fi
+
+ emake
+}
+
+src_test() {
+ emake check
+}
+
+src_install() {
+ apache-module_src_install
+
+ # install manually rather than by using the APACHE2_MOD_CONF
+ # variable since we have to edit it to set things up properly.
+ insinto "${APACHE_MODULES_CONFDIR}"
+ doins "${T}"/79_modsecurity.conf
+
+ dodoc CHANGES NOTICE README.TXT README_WINDOWS.TXT
+
+ dohtml -r doc/*
+
+ keepdir /var/cache/modsecurity
+ fowners apache:apache /var/cache/modsecurity
+ fperms 0770 /var/cache/modsecurity
+}
+
+pkg_postinst() {
+ if [[ -f "${ROOT}"/etc/apache/modules.d/99_mod_security.conf ]]; then
+ ewarn "You still have the configuration file 99_mod_security.conf."
+ ewarn "Please make sure to remove that and keep only 79_modsecurity.conf."
+ ewarn ""
+ fi
+ elog "The base configuration file has been renamed 79_modsecurity.conf"
+ elog "so that you can put your own configuration as 90_modsecurity_local.conf or"
+ elog "equivalent."
+ elog ""
+ elog "That would be the correct place for site-global security rules."
+ elog "Note: 80_modsecurity_crs.conf is used by www-apache/modsecurity-crs"
+}
diff --git a/www-apache/mod_security/mod_security-2.7.5.ebuild b/www-apache/mod_security/mod_security-2.7.5.ebuild
new file mode 100644
index 000000000000..393536d792d9
--- /dev/null
+++ b/www-apache/mod_security/mod_security-2.7.5.ebuild
@@ -0,0 +1,97 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit apache-module
+
+MY_PN=modsecurity-apache
+MY_PV=${PV/_rc/-rc}
+MY_P=${MY_PN}_${MY_PV}
+
+DESCRIPTION="Web application firewall and Intrusion Detection System for Apache"
+HOMEPAGE="http://www.modsecurity.org/"
+SRC_URI="http://www.modsecurity.org/tarball/${PV}/${MY_P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~sparc ~x86"
+IUSE="geoip curl lua jit"
+
+DEPEND=">=dev-libs/libxml2-2.7.8
+ dev-libs/libpcre[jit?]
+ lua? ( >=dev-lang/lua-5.1 )
+ curl? ( >=net-misc/curl-7.15.1 )
+ www-servers/apache[apache2_modules_unique_id]"
+RDEPEND="${DEPEND}
+ geoip? ( dev-libs/geoip )"
+PDEPEND=">=www-apache/modsecurity-crs-2.2.6-r1"
+
+S="${WORKDIR}/${MY_P}"
+
+APACHE2_MOD_FILE="apache2/.libs/${PN}2.so"
+APACHE2_MOD_DEFINE="SECURITY"
+
+# Tests require symbols only defined within the Apache binary.
+RESTRICT=test
+
+need_apache2
+
+src_prepare() {
+ cp "${FILESDIR}"/modsecurity-2.7.conf "${T}"/79_modsecurity.conf || die
+}
+
+src_configure() {
+ econf \
+ --enable-shared --disable-static \
+ --with-apxs="${APXS}" \
+ --enable-request-early \
+ $(use_enable curl mlogc) \
+ $(use_with lua) \
+ $(use_enable jit pcre-jit)
+}
+
+src_compile() {
+ if ! use geoip; then
+ sed -i -e '/SecGeoLookupDb/s:^:#:' \
+ "${T}"/79_modsecurity.conf || die
+ fi
+
+ emake
+}
+
+src_test() {
+ emake check
+}
+
+src_install() {
+ apache-module_src_install
+
+ # install manually rather than by using the APACHE2_MOD_CONF
+ # variable since we have to edit it to set things up properly.
+ insinto "${APACHE_MODULES_CONFDIR}"
+ doins "${T}"/79_modsecurity.conf
+
+ dodoc CHANGES NOTICE README.TXT README_WINDOWS.TXT
+
+ dohtml -r doc/*
+
+ keepdir /var/cache/modsecurity
+ fowners apache:apache /var/cache/modsecurity
+ fperms 0770 /var/cache/modsecurity
+}
+
+pkg_postinst() {
+ if [[ -f "${ROOT}"/etc/apache/modules.d/99_mod_security.conf ]]; then
+ ewarn "You still have the configuration file 99_mod_security.conf."
+ ewarn "Please make sure to remove that and keep only 79_modsecurity.conf."
+ ewarn ""
+ fi
+ elog "The base configuration file has been renamed 79_modsecurity.conf"
+ elog "so that you can put your own configuration as 90_modsecurity_local.conf or"
+ elog "equivalent."
+ elog ""
+ elog "That would be the correct place for site-global security rules."
+ elog "Note: 80_modsecurity_crs.conf is used by www-apache/modsecurity-crs"
+}
diff --git a/www-apache/mod_security/mod_security-2.7.7.ebuild b/www-apache/mod_security/mod_security-2.7.7.ebuild
new file mode 100644
index 000000000000..393536d792d9
--- /dev/null
+++ b/www-apache/mod_security/mod_security-2.7.7.ebuild
@@ -0,0 +1,97 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit apache-module
+
+MY_PN=modsecurity-apache
+MY_PV=${PV/_rc/-rc}
+MY_P=${MY_PN}_${MY_PV}
+
+DESCRIPTION="Web application firewall and Intrusion Detection System for Apache"
+HOMEPAGE="http://www.modsecurity.org/"
+SRC_URI="http://www.modsecurity.org/tarball/${PV}/${MY_P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~sparc ~x86"
+IUSE="geoip curl lua jit"
+
+DEPEND=">=dev-libs/libxml2-2.7.8
+ dev-libs/libpcre[jit?]
+ lua? ( >=dev-lang/lua-5.1 )
+ curl? ( >=net-misc/curl-7.15.1 )
+ www-servers/apache[apache2_modules_unique_id]"
+RDEPEND="${DEPEND}
+ geoip? ( dev-libs/geoip )"
+PDEPEND=">=www-apache/modsecurity-crs-2.2.6-r1"
+
+S="${WORKDIR}/${MY_P}"
+
+APACHE2_MOD_FILE="apache2/.libs/${PN}2.so"
+APACHE2_MOD_DEFINE="SECURITY"
+
+# Tests require symbols only defined within the Apache binary.
+RESTRICT=test
+
+need_apache2
+
+src_prepare() {
+ cp "${FILESDIR}"/modsecurity-2.7.conf "${T}"/79_modsecurity.conf || die
+}
+
+src_configure() {
+ econf \
+ --enable-shared --disable-static \
+ --with-apxs="${APXS}" \
+ --enable-request-early \
+ $(use_enable curl mlogc) \
+ $(use_with lua) \
+ $(use_enable jit pcre-jit)
+}
+
+src_compile() {
+ if ! use geoip; then
+ sed -i -e '/SecGeoLookupDb/s:^:#:' \
+ "${T}"/79_modsecurity.conf || die
+ fi
+
+ emake
+}
+
+src_test() {
+ emake check
+}
+
+src_install() {
+ apache-module_src_install
+
+ # install manually rather than by using the APACHE2_MOD_CONF
+ # variable since we have to edit it to set things up properly.
+ insinto "${APACHE_MODULES_CONFDIR}"
+ doins "${T}"/79_modsecurity.conf
+
+ dodoc CHANGES NOTICE README.TXT README_WINDOWS.TXT
+
+ dohtml -r doc/*
+
+ keepdir /var/cache/modsecurity
+ fowners apache:apache /var/cache/modsecurity
+ fperms 0770 /var/cache/modsecurity
+}
+
+pkg_postinst() {
+ if [[ -f "${ROOT}"/etc/apache/modules.d/99_mod_security.conf ]]; then
+ ewarn "You still have the configuration file 99_mod_security.conf."
+ ewarn "Please make sure to remove that and keep only 79_modsecurity.conf."
+ ewarn ""
+ fi
+ elog "The base configuration file has been renamed 79_modsecurity.conf"
+ elog "so that you can put your own configuration as 90_modsecurity_local.conf or"
+ elog "equivalent."
+ elog ""
+ elog "That would be the correct place for site-global security rules."
+ elog "Note: 80_modsecurity_crs.conf is used by www-apache/modsecurity-crs"
+}
diff --git a/www-apache/mod_slotlimit/Manifest b/www-apache/mod_slotlimit/Manifest
new file mode 100644
index 000000000000..3d1933246ded
--- /dev/null
+++ b/www-apache/mod_slotlimit/Manifest
@@ -0,0 +1 @@
+DIST mod_slotlimit-1.3.tar.gz 17100 SHA256 ad722f5f6791ee97f361cc801d930c2106ee775d1f88efed1b5ac9fd9e538106 SHA512 3da9763831bf9869d8f9ccf68cee28b40a1e900313b223878a86d813009d8b94bb5fcd8423baf40d2feafb2beff02d352a69c2b21e6d89deb9bc404814ffa71b WHIRLPOOL 10dab747cee02ede966ce473466512edf516032fd50ea070766f160627bc9a365b9e2661eec01c9ae4c959d3e2d213e4ad891ae415faa7990d0af3fb5e53134e
diff --git a/www-apache/mod_slotlimit/files/10_mod_slotlimit.conf b/www-apache/mod_slotlimit/files/10_mod_slotlimit.conf
new file mode 100644
index 000000000000..93f95fbb40b1
--- /dev/null
+++ b/www-apache/mod_slotlimit/files/10_mod_slotlimit.conf
@@ -0,0 +1,76 @@
+<IfDefine SLOTLIMIT>
+LoadModule slotlimit_module modules/mod_slotlimit.so
+
+# AvailableSlotsPercent
+# Syntax: AvailableSlotsPercent number
+# Default: 0
+#
+# Percentage of apache slots available in order to set any restrictions.
+# Setting it to 0 dynamic slot allocation algorithm will be deactivated.
+# When has remained free the specified percentage of apache slots, module
+# start to manage incoming connections, penalizing sites that are monopolizing
+# the resources of the server.
+#
+# N.B. Before activating this option check that the apache scoreboard display
+# correct vhost name of the running sites. In order to make this you can
+# activate (momentarily) mod_status and connect to http://yourserver/server-status.
+# If Vhost hostname do not display correctly the name of the sites visited
+# sets up to "On" the directive "ForceVhostName" before using "AvailableSlotsPercent".
+#
+# MaxConnectionsPerSite
+# Syntax: MaxConnectionsPerSite number
+# Default: No Limit
+#
+# Max connections for each running site
+#
+# N.B. Like for "AvailableSlotsPercent" if Vhost hostname do not display correctly
+# the name of the sites visited sets up to "On" the directive "ForceVhostName".
+#
+# ClientIpLimit
+# Syntax: ClientIpLimit number
+# Default: 40
+#
+# Number of maximum simultaneous connection per IP.
+#
+# ForceVhostName
+# Syntax: ForceVhostName On|Off
+# Default: Off
+#
+# Force vhost hostname in scoreboard. Vhost hostname do not match site
+# visited under some conditions, for example with some mass virtual hosting technique.
+# In order to check that this is not your case you can use mod_status.
+# Setting this directive to On, mod_slotlimit will overwrite vhost hostname
+# in apache scoreboard.
+#
+# CustomErrMsg
+# Syntax: CustomErrMsg "My custom error message"
+# Default: "Blocked by mod_slotlimit. More information about this error may be available in the server error log."
+#
+# A custom error message that allows you to replace default error message with one you create
+#
+# CustomLimitsFile
+# Syntax: CustomLimitsFile /path/to/file
+# Default: No Value
+#
+# Using this directive you can specify limits customized for each running site,
+# penalizing or privileged it. In the file should be stored (line by line) the
+# site name and the number of usable slots. You can add comments by using the '#'
+# character. The file format is as follows:
+#
+# ..
+# ..
+# www.sitename1.it 10
+# # this is a comment
+# www.site2.com 35
+# ..
+# ..
+
+# Example:
+# AvailableSlotsPercent 13
+# MaxConnectionsPerSite 20
+# ClientIpLimit 20
+# CustomLimitsFile /etc/apache2/mod_slotlimit.rules
+
+</IfDefine>
+
+# vim: ts=4 filetype=apache
diff --git a/www-apache/mod_slotlimit/metadata.xml b/www-apache/mod_slotlimit/metadata.xml
new file mode 100644
index 000000000000..bddc8a291f6f
--- /dev/null
+++ b/www-apache/mod_slotlimit/metadata.xml
@@ -0,0 +1,7 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>patrick@gentoo.org</email>
+ </maintainer>
+</pkgmetadata>
diff --git a/www-apache/mod_slotlimit/mod_slotlimit-1.3.ebuild b/www-apache/mod_slotlimit/mod_slotlimit-1.3.ebuild
new file mode 100644
index 000000000000..1eecb2309a72
--- /dev/null
+++ b/www-apache/mod_slotlimit/mod_slotlimit-1.3.ebuild
@@ -0,0 +1,25 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=3
+
+inherit apache-module
+
+MY_PV=${PV/_/-}
+MY_P="mod_slotlimit-${MY_PV}"
+
+DESCRIPTION="manage resources used for each running site using dynamic slot allocation algorithm and static rules"
+HOMEPAGE="http://www.lucaercoli.it/en/mod_slotlimit.html"
+SRC_URI="http://downloads.sourceforge.net/project/mod-slotlimit/mod-slotlimit/${MY_PV}/${P}.tar.gz"
+LICENSE="GPL-2"
+
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+SLOT="0"
+
+# See apache-module.eclass for more information.
+APACHE2_MOD_CONF="10_${PN}"
+APACHE2_MOD_DEFINE="SLOTLIMIT"
+
+need_apache2_2
diff --git a/www-apache/mod_spdy/Manifest b/www-apache/mod_spdy/Manifest
new file mode 100644
index 000000000000..f519f81bcec1
--- /dev/null
+++ b/www-apache/mod_spdy/Manifest
@@ -0,0 +1,3 @@
+DIST mod_spdy-0.9.3.3.tar.xz 6537516 SHA256 39e64b0e8ef4dc6f41e2b6880040ef4d2485619653feafbc2b29cade7e49978b SHA512 079370642dbefde5da0bc4fbc98b57daa3c58bb7f4459b07d32b0807124aa31eaa702781be58597597cafc4d29df8b09cd189f2641c18590430ae4d2a667493e WHIRLPOOL 54363789d2f157fa6bef60314e04234a5341b730caaaa09233e986c8e795f0049f227845a3abce3e6e47a7cdef695adc3780b8e1c4568e6e426a9a4c17575836
+DIST mod_spdy-0.9.4.2.tar.xz 7333300 SHA256 009d5c10ffa08b805f86eac57dd08a84b8e0f25c0a3a5b14a4b1b4e6bb5d6d13 SHA512 2a03501af9ca5e5de573e0140676954b6ef184423d53a2d9d145d29766641e7921ba6adeb381c70a337f18adb4aa3680c6680811985c523b3ca14efb80a4d909 WHIRLPOOL b02f88109f0dce735c3a54929a88b11e79f0025d74b0028385420e369517be0dc677983da40fdaed49f3b5ea799a0d90c82525ba9c996e840046ecb7e2bec953
+DIST mod_spdy-0.9.4.3.tar.xz 7333484 SHA256 d58a640781e64ad6c9888deeb2b4830dc38869222de273c9f2129e8127ca5258 SHA512 2208616b07bc2a0b42813a256aeab889c093d9d77fe803be8858699ea6566c8fe2031f3bc2761fa7691a27f0b18ffdca01fe54502c83196d20016a650e9f0529 WHIRLPOOL d8d2f6f77eac7d9a1a89f2d0775cea991dd55eb7e32a73da1e9ec842dc87ce46ff95caddc6027426ea63cafc05b5e79f6e66d6452aca7da7984c87b34162b15d
diff --git a/www-apache/mod_spdy/files/make-snapshot.sh b/www-apache/mod_spdy/files/make-snapshot.sh
new file mode 100755
index 000000000000..0fd294a11d9c
--- /dev/null
+++ b/www-apache/mod_spdy/files/make-snapshot.sh
@@ -0,0 +1,47 @@
+#!/bin/bash
+
+if [[ $# -gt 1 || $1 == -* ]] ; then
+ echo "Usage: $0 [ver]"
+ exit 1
+fi
+
+set -ex
+
+SPDY_URL_BASE="http://mod-spdy.googlecode.com/svn/tags"
+
+if [[ $# -eq 1 ]] ; then
+ PV=$1
+else
+ svnout=$(svn ls ${SPDY_URL_BASE} | grep -v current | sort -V | tail -1)
+ PV=${svnout%/}
+fi
+
+PN="mod_spdy"
+P="${PN}-${PV}"
+
+: ${TMPDIR:=/tmp}
+
+tmp="${TMPDIR}/${PN}"
+rm -rf "${tmp}"
+mkdir "${tmp}"
+cd "${tmp}"
+
+DEPOT_TOOLS_URL="https://chromium.googlesource.com/chromium/tools/depot_tools.git"
+SPDY_URL="http://mod-spdy.googlecode.com/svn/tags/${PV}/src"
+
+git clone --single-branch --depth 1 ${DEPOT_TOOLS_URL}
+rm -rf depot_tools/.git
+PATH=${PWD}/depot_tools:${PATH}
+mkdir ${P}
+cd ${P}
+gclient config ${SPDY_URL}
+gclient sync --force --nohooks --delete_unversioned_trees
+cd ..
+
+tar cf - depot_tools ${P} | xz > ${P}.tar.xz
+
+mv ${P}.tar.xz "${TMPDIR}"/
+cd /
+rm -rf "${tmp}"
+
+du -hb "${TMPDIR}/${P}.tar.xz"
diff --git a/www-apache/mod_spdy/files/mod_spdy-0.9.3.3-execinfo.patch b/www-apache/mod_spdy/files/mod_spdy-0.9.3.3-execinfo.patch
new file mode 100644
index 000000000000..67b83adf3094
--- /dev/null
+++ b/www-apache/mod_spdy/files/mod_spdy-0.9.3.3-execinfo.patch
@@ -0,0 +1,30 @@
+not everyone has this header
+
+--- a/src/third_party/chromium/src/base/debug/debugger_posix.cc
++++ b/src/third_party/chromium/src/base/debug/debugger_posix.cc
+@@ -17,10 +17,6 @@
+ #include <string>
+ #include <vector>
+
+-#if !defined(OS_ANDROID) && !defined(OS_NACL)
+-#include <execinfo.h>
+-#endif
+-
+ #if defined(__GLIBCXX__)
+ #include <cxxabi.h>
+ #endif
+--- a/src/third_party/chromium/src/base/debug/stack_trace_posix.cc
++++ b/src/third_party/chromium/src/base/debug/stack_trace_posix.cc
+@@ -5,7 +5,12 @@
+ #include "base/debug/stack_trace.h"
+
+ #include <errno.h>
++#if defined(__GLIBC__) && !defined(__UCLIBC__)
+ #include <execinfo.h>
++#else
++#define backtrace(array, size) 0
++#define backtrace_symbols(array, size) NULL
++#endif
+ #include <fcntl.h>
+ #include <stdio.h>
+ #include <stdlib.h>
diff --git a/www-apache/mod_spdy/files/mod_spdy-0.9.3.3-system-zlib.patch b/www-apache/mod_spdy/files/mod_spdy-0.9.3.3-system-zlib.patch
new file mode 100644
index 000000000000..797566896352
--- /dev/null
+++ b/www-apache/mod_spdy/files/mod_spdy-0.9.3.3-system-zlib.patch
@@ -0,0 +1,39 @@
+--- src/third_party/zlib/zlib.gyp
++++ src/third_party/zlib/zlib.gyp
+@@ -81,14 +81,6 @@
+ 'defines': [
+ 'USE_SYSTEM_ZLIB',
+ ],
+- 'sources': [
+- 'contrib/minizip/ioapi.c',
+- 'contrib/minizip/ioapi.h',
+- 'contrib/minizip/unzip.c',
+- 'contrib/minizip/unzip.h',
+- 'contrib/minizip/zip.c',
+- 'contrib/minizip/zip.h',
+- ],
+ 'conditions': [
+ ['OS=="android"', {
+ 'toolsets': ['target', 'host'],
+@@ -97,6 +89,7 @@
+ 'link_settings': {
+ 'libraries': [
+ '-lz',
++ '-lminizip',
+ ],
+ },
+ }],
+
+https://code.google.com/p/mod-spdy/issues/detail?id=71
+
+--- src/build/common.gypi
++++ src/build/common.gypi
+@@ -25,7 +25,7 @@
+ # (Chromium already has transitive dependencies on these libraries
+ # via gtk). We want to link these libraries into our binaries so
+ # we change the default behavior.
+- 'use_system_zlib': 0,
++ 'use_system_zlib%': 0,
+ 'use_system_apache_dev%': 0,
+
+ # Putting a variables dict inside another variables dict looks kind of
diff --git a/www-apache/mod_spdy/metadata.xml b/www-apache/mod_spdy/metadata.xml
new file mode 100644
index 000000000000..7123fa8f9ece
--- /dev/null
+++ b/www-apache/mod_spdy/metadata.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+ <email>vapier@gentoo.org</email>
+</maintainer>
+</pkgmetadata>
diff --git a/www-apache/mod_spdy/mod_spdy-0.9.3.3.ebuild b/www-apache/mod_spdy/mod_spdy-0.9.3.3.ebuild
new file mode 100644
index 000000000000..0aba468f7858
--- /dev/null
+++ b/www-apache/mod_spdy/mod_spdy-0.9.3.3.ebuild
@@ -0,0 +1,114 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+inherit apache-module eutils python-any-r1
+
+if [[ ${PV} == 9999 ]] ; then
+ ESVN_REPO_URI="http://mod-spdy.googlecode.com/svn/trunk/src"
+ ESVN_RESTRICT="export"
+ EGIT_REPO_URI="https://chromium.googlesource.com/chromium/tools/depot_tools.git"
+ EGIT_SOURCEDIR="${WORKDIR}/depot_tools"
+ inherit subversion git-2
+else
+ SRC_URI="mirror://gentoo/${P}.tar.xz"
+ KEYWORDS="~amd64 ~x86"
+fi
+
+DESCRIPTION="Apache module for rewriting web pages to reduce latency and bandwidth"
+HOMEPAGE="http://code.google.com/p/mod-spdy"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+IUSE="debug test"
+
+RDEPEND="sys-libs/zlib[minizip]"
+DEPEND="${RDEPEND}"
+if [[ ${PV} == 9999 ]] ; then
+ DEPEND+=" net-misc/rsync"
+fi
+
+need_apache2_2
+
+e() { echo "$@"; "$@" || die; }
+
+EGCLIENT="${WORKDIR}/depot_tools/gclient"
+egclient() { set -- "${EGCLIENT}" "$@"; e "$@"; }
+
+src_unpack() {
+ if [[ ${PV} == "9999" ]] ; then
+ git-2_src_unpack
+
+ subversion_src_unpack
+ mkdir -p "${ESVN_STORE_DIR}/${PN}" || die
+ cd "${ESVN_STORE_DIR}/${PN}" || die
+
+ egclient config ${ESVN_REPO_URI}
+ egclient sync --force --nohooks --delete_unversioned_trees
+ e rsync -a --exclude=".svn/" ./ "${S}/"
+ else
+ default
+ fi
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-0.9.3.3-execinfo.patch
+
+ # Make sure the system zlib is used.
+ epatch "${FILESDIR}"/${PN}-0.9.3.3-system-zlib.patch
+ find src/third_party/zlib/ -name '*.[ch]' -delete
+}
+
+src_configure() {
+ tc-export AR CC CXX RANLIB
+ tc-export_build_env BUILD_AR BUILD_CC BUILD_CXX
+
+ local myconf=(
+ -Dlinux_fpic=1
+ -Duse_system_zlib=1
+ -Duse_system_ssl=1
+ -Dwerror=
+ )
+ #egclient runhooks "${myconf[@]}"
+ e python src/build/gyp_chromium "${myconf[@]}"
+}
+
+echo_tests() { echo base_unittests spdy_{apache,common}_test; }
+src_compile() {
+ emake -C src \
+ V=1 \
+ BUILDTYPE=$(usex debug Debug Release) \
+ mod_spdy \
+ $(use test && echo_tests)
+}
+
+src_test() {
+ cd src/out/Release
+ local t
+ for t in $(echo_tests) ; do
+ e ./${t}
+ done
+}
+
+src_install() {
+ ln -sf src/out/*/libmod_spdy.so ${PN}.so || die
+ APACHE2_MOD_FILE="${PWD}/${PN}.so"
+ APACHE2_MOD_DEFINE="SPDY"
+ apache-module_src_install
+
+ # Workaround #471442
+ cd "${S}/src"
+ local conf="${T}/80_${PN}.conf"
+ cat <<-EOF > "${conf}"
+ <IfDefine SPDY>
+ $(sed 's:@@APACHE_MODULEDIR@@:modules:' install/common/spdy.load.template)
+
+ $(<install/common/spdy.conf.template)
+ </IfDefine>
+ EOF
+ insinto "${APACHE_MODULES_CONFDIR}"
+ doins "${conf}"
+}
diff --git a/www-apache/mod_spdy/mod_spdy-0.9.4.2.ebuild b/www-apache/mod_spdy/mod_spdy-0.9.4.2.ebuild
new file mode 100644
index 000000000000..0aba468f7858
--- /dev/null
+++ b/www-apache/mod_spdy/mod_spdy-0.9.4.2.ebuild
@@ -0,0 +1,114 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+inherit apache-module eutils python-any-r1
+
+if [[ ${PV} == 9999 ]] ; then
+ ESVN_REPO_URI="http://mod-spdy.googlecode.com/svn/trunk/src"
+ ESVN_RESTRICT="export"
+ EGIT_REPO_URI="https://chromium.googlesource.com/chromium/tools/depot_tools.git"
+ EGIT_SOURCEDIR="${WORKDIR}/depot_tools"
+ inherit subversion git-2
+else
+ SRC_URI="mirror://gentoo/${P}.tar.xz"
+ KEYWORDS="~amd64 ~x86"
+fi
+
+DESCRIPTION="Apache module for rewriting web pages to reduce latency and bandwidth"
+HOMEPAGE="http://code.google.com/p/mod-spdy"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+IUSE="debug test"
+
+RDEPEND="sys-libs/zlib[minizip]"
+DEPEND="${RDEPEND}"
+if [[ ${PV} == 9999 ]] ; then
+ DEPEND+=" net-misc/rsync"
+fi
+
+need_apache2_2
+
+e() { echo "$@"; "$@" || die; }
+
+EGCLIENT="${WORKDIR}/depot_tools/gclient"
+egclient() { set -- "${EGCLIENT}" "$@"; e "$@"; }
+
+src_unpack() {
+ if [[ ${PV} == "9999" ]] ; then
+ git-2_src_unpack
+
+ subversion_src_unpack
+ mkdir -p "${ESVN_STORE_DIR}/${PN}" || die
+ cd "${ESVN_STORE_DIR}/${PN}" || die
+
+ egclient config ${ESVN_REPO_URI}
+ egclient sync --force --nohooks --delete_unversioned_trees
+ e rsync -a --exclude=".svn/" ./ "${S}/"
+ else
+ default
+ fi
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-0.9.3.3-execinfo.patch
+
+ # Make sure the system zlib is used.
+ epatch "${FILESDIR}"/${PN}-0.9.3.3-system-zlib.patch
+ find src/third_party/zlib/ -name '*.[ch]' -delete
+}
+
+src_configure() {
+ tc-export AR CC CXX RANLIB
+ tc-export_build_env BUILD_AR BUILD_CC BUILD_CXX
+
+ local myconf=(
+ -Dlinux_fpic=1
+ -Duse_system_zlib=1
+ -Duse_system_ssl=1
+ -Dwerror=
+ )
+ #egclient runhooks "${myconf[@]}"
+ e python src/build/gyp_chromium "${myconf[@]}"
+}
+
+echo_tests() { echo base_unittests spdy_{apache,common}_test; }
+src_compile() {
+ emake -C src \
+ V=1 \
+ BUILDTYPE=$(usex debug Debug Release) \
+ mod_spdy \
+ $(use test && echo_tests)
+}
+
+src_test() {
+ cd src/out/Release
+ local t
+ for t in $(echo_tests) ; do
+ e ./${t}
+ done
+}
+
+src_install() {
+ ln -sf src/out/*/libmod_spdy.so ${PN}.so || die
+ APACHE2_MOD_FILE="${PWD}/${PN}.so"
+ APACHE2_MOD_DEFINE="SPDY"
+ apache-module_src_install
+
+ # Workaround #471442
+ cd "${S}/src"
+ local conf="${T}/80_${PN}.conf"
+ cat <<-EOF > "${conf}"
+ <IfDefine SPDY>
+ $(sed 's:@@APACHE_MODULEDIR@@:modules:' install/common/spdy.load.template)
+
+ $(<install/common/spdy.conf.template)
+ </IfDefine>
+ EOF
+ insinto "${APACHE_MODULES_CONFDIR}"
+ doins "${conf}"
+}
diff --git a/www-apache/mod_spdy/mod_spdy-0.9.4.3.ebuild b/www-apache/mod_spdy/mod_spdy-0.9.4.3.ebuild
new file mode 100644
index 000000000000..0aba468f7858
--- /dev/null
+++ b/www-apache/mod_spdy/mod_spdy-0.9.4.3.ebuild
@@ -0,0 +1,114 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+inherit apache-module eutils python-any-r1
+
+if [[ ${PV} == 9999 ]] ; then
+ ESVN_REPO_URI="http://mod-spdy.googlecode.com/svn/trunk/src"
+ ESVN_RESTRICT="export"
+ EGIT_REPO_URI="https://chromium.googlesource.com/chromium/tools/depot_tools.git"
+ EGIT_SOURCEDIR="${WORKDIR}/depot_tools"
+ inherit subversion git-2
+else
+ SRC_URI="mirror://gentoo/${P}.tar.xz"
+ KEYWORDS="~amd64 ~x86"
+fi
+
+DESCRIPTION="Apache module for rewriting web pages to reduce latency and bandwidth"
+HOMEPAGE="http://code.google.com/p/mod-spdy"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+IUSE="debug test"
+
+RDEPEND="sys-libs/zlib[minizip]"
+DEPEND="${RDEPEND}"
+if [[ ${PV} == 9999 ]] ; then
+ DEPEND+=" net-misc/rsync"
+fi
+
+need_apache2_2
+
+e() { echo "$@"; "$@" || die; }
+
+EGCLIENT="${WORKDIR}/depot_tools/gclient"
+egclient() { set -- "${EGCLIENT}" "$@"; e "$@"; }
+
+src_unpack() {
+ if [[ ${PV} == "9999" ]] ; then
+ git-2_src_unpack
+
+ subversion_src_unpack
+ mkdir -p "${ESVN_STORE_DIR}/${PN}" || die
+ cd "${ESVN_STORE_DIR}/${PN}" || die
+
+ egclient config ${ESVN_REPO_URI}
+ egclient sync --force --nohooks --delete_unversioned_trees
+ e rsync -a --exclude=".svn/" ./ "${S}/"
+ else
+ default
+ fi
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-0.9.3.3-execinfo.patch
+
+ # Make sure the system zlib is used.
+ epatch "${FILESDIR}"/${PN}-0.9.3.3-system-zlib.patch
+ find src/third_party/zlib/ -name '*.[ch]' -delete
+}
+
+src_configure() {
+ tc-export AR CC CXX RANLIB
+ tc-export_build_env BUILD_AR BUILD_CC BUILD_CXX
+
+ local myconf=(
+ -Dlinux_fpic=1
+ -Duse_system_zlib=1
+ -Duse_system_ssl=1
+ -Dwerror=
+ )
+ #egclient runhooks "${myconf[@]}"
+ e python src/build/gyp_chromium "${myconf[@]}"
+}
+
+echo_tests() { echo base_unittests spdy_{apache,common}_test; }
+src_compile() {
+ emake -C src \
+ V=1 \
+ BUILDTYPE=$(usex debug Debug Release) \
+ mod_spdy \
+ $(use test && echo_tests)
+}
+
+src_test() {
+ cd src/out/Release
+ local t
+ for t in $(echo_tests) ; do
+ e ./${t}
+ done
+}
+
+src_install() {
+ ln -sf src/out/*/libmod_spdy.so ${PN}.so || die
+ APACHE2_MOD_FILE="${PWD}/${PN}.so"
+ APACHE2_MOD_DEFINE="SPDY"
+ apache-module_src_install
+
+ # Workaround #471442
+ cd "${S}/src"
+ local conf="${T}/80_${PN}.conf"
+ cat <<-EOF > "${conf}"
+ <IfDefine SPDY>
+ $(sed 's:@@APACHE_MODULEDIR@@:modules:' install/common/spdy.load.template)
+
+ $(<install/common/spdy.conf.template)
+ </IfDefine>
+ EOF
+ insinto "${APACHE_MODULES_CONFDIR}"
+ doins "${conf}"
+}
diff --git a/www-apache/mod_spdy/mod_spdy-9999.ebuild b/www-apache/mod_spdy/mod_spdy-9999.ebuild
new file mode 100644
index 000000000000..0aba468f7858
--- /dev/null
+++ b/www-apache/mod_spdy/mod_spdy-9999.ebuild
@@ -0,0 +1,114 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+inherit apache-module eutils python-any-r1
+
+if [[ ${PV} == 9999 ]] ; then
+ ESVN_REPO_URI="http://mod-spdy.googlecode.com/svn/trunk/src"
+ ESVN_RESTRICT="export"
+ EGIT_REPO_URI="https://chromium.googlesource.com/chromium/tools/depot_tools.git"
+ EGIT_SOURCEDIR="${WORKDIR}/depot_tools"
+ inherit subversion git-2
+else
+ SRC_URI="mirror://gentoo/${P}.tar.xz"
+ KEYWORDS="~amd64 ~x86"
+fi
+
+DESCRIPTION="Apache module for rewriting web pages to reduce latency and bandwidth"
+HOMEPAGE="http://code.google.com/p/mod-spdy"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+IUSE="debug test"
+
+RDEPEND="sys-libs/zlib[minizip]"
+DEPEND="${RDEPEND}"
+if [[ ${PV} == 9999 ]] ; then
+ DEPEND+=" net-misc/rsync"
+fi
+
+need_apache2_2
+
+e() { echo "$@"; "$@" || die; }
+
+EGCLIENT="${WORKDIR}/depot_tools/gclient"
+egclient() { set -- "${EGCLIENT}" "$@"; e "$@"; }
+
+src_unpack() {
+ if [[ ${PV} == "9999" ]] ; then
+ git-2_src_unpack
+
+ subversion_src_unpack
+ mkdir -p "${ESVN_STORE_DIR}/${PN}" || die
+ cd "${ESVN_STORE_DIR}/${PN}" || die
+
+ egclient config ${ESVN_REPO_URI}
+ egclient sync --force --nohooks --delete_unversioned_trees
+ e rsync -a --exclude=".svn/" ./ "${S}/"
+ else
+ default
+ fi
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-0.9.3.3-execinfo.patch
+
+ # Make sure the system zlib is used.
+ epatch "${FILESDIR}"/${PN}-0.9.3.3-system-zlib.patch
+ find src/third_party/zlib/ -name '*.[ch]' -delete
+}
+
+src_configure() {
+ tc-export AR CC CXX RANLIB
+ tc-export_build_env BUILD_AR BUILD_CC BUILD_CXX
+
+ local myconf=(
+ -Dlinux_fpic=1
+ -Duse_system_zlib=1
+ -Duse_system_ssl=1
+ -Dwerror=
+ )
+ #egclient runhooks "${myconf[@]}"
+ e python src/build/gyp_chromium "${myconf[@]}"
+}
+
+echo_tests() { echo base_unittests spdy_{apache,common}_test; }
+src_compile() {
+ emake -C src \
+ V=1 \
+ BUILDTYPE=$(usex debug Debug Release) \
+ mod_spdy \
+ $(use test && echo_tests)
+}
+
+src_test() {
+ cd src/out/Release
+ local t
+ for t in $(echo_tests) ; do
+ e ./${t}
+ done
+}
+
+src_install() {
+ ln -sf src/out/*/libmod_spdy.so ${PN}.so || die
+ APACHE2_MOD_FILE="${PWD}/${PN}.so"
+ APACHE2_MOD_DEFINE="SPDY"
+ apache-module_src_install
+
+ # Workaround #471442
+ cd "${S}/src"
+ local conf="${T}/80_${PN}.conf"
+ cat <<-EOF > "${conf}"
+ <IfDefine SPDY>
+ $(sed 's:@@APACHE_MODULEDIR@@:modules:' install/common/spdy.load.template)
+
+ $(<install/common/spdy.conf.template)
+ </IfDefine>
+ EOF
+ insinto "${APACHE_MODULES_CONFDIR}"
+ doins "${conf}"
+}
diff --git a/www-apache/mod_tcl/Manifest b/www-apache/mod_tcl/Manifest
new file mode 100644
index 000000000000..b801629d0ee4
--- /dev/null
+++ b/www-apache/mod_tcl/Manifest
@@ -0,0 +1 @@
+DIST mod_tcl-1.0.1.tar.bz2 18772 SHA256 b1e5b859707d1a81e7588c35fbe1f69fefa4cada04da20048b80269ed43101dd SHA512 d32a722115079696bef6b88a295a25cc752552d0d6ceb598ba1bcbf54151fb5dbfe192f8f2e9f7f31ba2cf0ad9f09b09967b00ae03c478453a497118ecaedaff WHIRLPOOL c73916c6d6d0e36975a9ad30fee2e020da2cd5ac3b391f727025ea634eb58597c282f7f1f71d1c951646f0ae9196d9c490315d45d97843b656ef6df0dc786e43
diff --git a/www-apache/mod_tcl/files/27_mod_tcl.conf b/www-apache/mod_tcl/files/27_mod_tcl.conf
new file mode 100644
index 000000000000..801702b37892
--- /dev/null
+++ b/www-apache/mod_tcl/files/27_mod_tcl.conf
@@ -0,0 +1,7 @@
+<IfDefine TCL>
+LoadModule tcl_module modules/mod_tcl.so
+
+# See http://tcl.apache.org/mod_tcl/ for now :/
+</IfDefine>
+
+# vim: ts=4 filetype=apache
diff --git a/www-apache/mod_tcl/metadata.xml b/www-apache/mod_tcl/metadata.xml
new file mode 100644
index 000000000000..4538a68724a6
--- /dev/null
+++ b/www-apache/mod_tcl/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer><email>maintainer-needed@gentoo.org</email></maintainer>
+</pkgmetadata>
diff --git a/www-apache/mod_tcl/mod_tcl-1.0.1.ebuild b/www-apache/mod_tcl/mod_tcl-1.0.1.ebuild
new file mode 100644
index 000000000000..6bbb9db3b915
--- /dev/null
+++ b/www-apache/mod_tcl/mod_tcl-1.0.1.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit apache-module
+
+DESCRIPTION="An Apache2 module providing an embedded Tcl interpreter"
+HOMEPAGE="http://tcl.apache.org/mod_tcl/"
+SRC_URI="mirror://gentoo/${P}.tar.bz2"
+
+SLOT="0"
+LICENSE="Apache-1.1"
+KEYWORDS="~amd64 ppc x86"
+IUSE=""
+
+DEPEND="dev-lang/tcl"
+RDEPEND="${DEPEND}"
+
+APXS2_ARGS="-c -Wl,-ltcl -DHAVE_TCL_H ${PN}.c tcl_cmds.c tcl_misc.c"
+
+APACHE2_MOD_CONF="27_${PN}"
+APACHE2_MOD_DEFINE="TCL"
+
+DOCFILES="AUTHORS INSTALL NEWS README test_script.tm"
+
+need_apache2_2
+
+src_compile() {
+ mv -f "tcl_core.c" "${PN}.c" || die
+ apache-module_src_compile
+}
diff --git a/www-apache/mod_tidy/Manifest b/www-apache/mod_tidy/Manifest
new file mode 100644
index 000000000000..c295124850ed
--- /dev/null
+++ b/www-apache/mod_tidy/Manifest
@@ -0,0 +1 @@
+DIST mod_tidy-0.5.5.tar.gz 312340 SHA256 3c8d3ca0ac67974efc82040bde224068e9b3024e1a2521664716aa2618310392
diff --git a/www-apache/mod_tidy/files/55_mod_tidy.conf b/www-apache/mod_tidy/files/55_mod_tidy.conf
new file mode 100644
index 000000000000..70984f71bd85
--- /dev/null
+++ b/www-apache/mod_tidy/files/55_mod_tidy.conf
@@ -0,0 +1,5 @@
+<IfDefine TIDY>
+LoadModule tidy_module modules/mod_tidy.so
+</IfDefine>
+
+# vim: ts=4 filetype=apache
diff --git a/www-apache/mod_tidy/metadata.xml b/www-apache/mod_tidy/metadata.xml
new file mode 100644
index 000000000000..4538a68724a6
--- /dev/null
+++ b/www-apache/mod_tidy/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer><email>maintainer-needed@gentoo.org</email></maintainer>
+</pkgmetadata>
diff --git a/www-apache/mod_tidy/mod_tidy-0.5.5-r1.ebuild b/www-apache/mod_tidy/mod_tidy-0.5.5-r1.ebuild
new file mode 100644
index 000000000000..f57aaf30afb4
--- /dev/null
+++ b/www-apache/mod_tidy/mod_tidy-0.5.5-r1.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+
+inherit apache-module
+
+DESCRIPTION="a TidyLib based module to parse, clean-up and pretty-print the webservers' (X)HTML output"
+SRC_URI="http://mod-tidy.sourceforge.net/src/${P}.tar.gz"
+HOMEPAGE="http://mod-tidy.sourceforge.net/"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+APACHE2_MOD_CONF="55_${PN}"
+APACHE2_MOD_DEFINE="TIDY"
+
+DEPEND="app-text/htmltidy"
+RDEPEND="${DEPEND}"
+
+need_apache2
+
+DOCFILES="Changes INSTALL LICENSE README"
+
+src_prepare() {
+ rm -rf tidy/
+}
+
+src_configure() {
+ :
+}
+
+src_compile() {
+ ${APXS} -c src/mod_tidy.c -ltidy
+}
diff --git a/www-apache/mod_umask/Manifest b/www-apache/mod_umask/Manifest
new file mode 100644
index 000000000000..c08734dd7e33
--- /dev/null
+++ b/www-apache/mod_umask/Manifest
@@ -0,0 +1 @@
+DIST mod_umask-0.1.0.tar.bz2 182078 SHA256 2be142d562260c895de94600a56b13d8346174b5e2f8a4974adcef23249ec790
diff --git a/www-apache/mod_umask/files/47_mod_umask.conf b/www-apache/mod_umask/files/47_mod_umask.conf
new file mode 100644
index 000000000000..aaa61d12aa9e
--- /dev/null
+++ b/www-apache/mod_umask/files/47_mod_umask.conf
@@ -0,0 +1,15 @@
+# PLEASE NOTE: consider this as an example configuration;
+# So, a more useful place would be, to use UMask directive
+# inside a subversion module driven virtual host, e.g.
+
+<IfDefine UMASK>
+LoadModule umask_module modules/mod_umask.so
+
+# This is default:
+# UMask 0022
+
+# This is usefull for group-write-access, such as used in subversion
+# UMask 0002
+</IfDefine>
+
+# vim: ts=4 filetype=apache
diff --git a/www-apache/mod_umask/metadata.xml b/www-apache/mod_umask/metadata.xml
new file mode 100644
index 000000000000..4538a68724a6
--- /dev/null
+++ b/www-apache/mod_umask/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer><email>maintainer-needed@gentoo.org</email></maintainer>
+</pkgmetadata>
diff --git a/www-apache/mod_umask/mod_umask-0.1.0.ebuild b/www-apache/mod_umask/mod_umask-0.1.0.ebuild
new file mode 100644
index 000000000000..e9ede4e798f7
--- /dev/null
+++ b/www-apache/mod_umask/mod_umask-0.1.0.ebuild
@@ -0,0 +1,22 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit apache-module
+
+KEYWORDS="amd64 x86"
+
+DESCRIPTION="Sets the Unix umask of the Apache2 webserver process after it has started"
+HOMEPAGE="http://www.outoforder.cc/projects/apache/mod_umask/"
+SRC_URI="http://www.apache.org/~pquerna/modules/${P}.tar.bz2"
+LICENSE="Apache-2.0"
+SLOT="0"
+IUSE=""
+
+DEPEND=""
+RDEPEND=""
+
+APACHE2_MOD_CONF="47_${PN}"
+APACHE2_MOD_DEFINE="UMASK"
+
+need_apache2
diff --git a/www-apache/mod_vdbh/Manifest b/www-apache/mod_vdbh/Manifest
new file mode 100644
index 000000000000..5aa91227cd9f
--- /dev/null
+++ b/www-apache/mod_vdbh/Manifest
@@ -0,0 +1 @@
+DIST mod_vdbh-1.0.3.tar.gz 8053 SHA256 ff034dc4a77d82085dad1b867af8d913034c476d7cc2bf3472e6ae38cef40225
diff --git a/www-apache/mod_vdbh/files/21_mod_vdbh.conf b/www-apache/mod_vdbh/files/21_mod_vdbh.conf
new file mode 100644
index 000000000000..337e07bbecdb
--- /dev/null
+++ b/www-apache/mod_vdbh/files/21_mod_vdbh.conf
@@ -0,0 +1,18 @@
+<IfDefine VDBH>
+LoadModule vdbh_module modules/mod_vdbh.so
+
+#NameVirtualHost 206.9.161.29
+#<VirtualHost 206.9.161.29>
+# vdbh On
+# vdbh_CLIENT_COMPRESS On
+# vdbh_MySQL_Database virtual_hosts
+# vdbh_MySQL_Table virtual_hosts
+# vdbh_MySQL_Host_Field server
+# vdbh_MySQL_Path_Field path
+# vdbh_MySQL_Environment_Field environment_variable
+# vdbh_Default_Host julia.fractal.net
+# vdbh_Declines .htpasswd *.txt
+#</VirtualHost>
+</IfDefine>
+
+# vim: ts=4 filetype=apache
diff --git a/www-apache/mod_vdbh/metadata.xml b/www-apache/mod_vdbh/metadata.xml
new file mode 100644
index 000000000000..4538a68724a6
--- /dev/null
+++ b/www-apache/mod_vdbh/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer><email>maintainer-needed@gentoo.org</email></maintainer>
+</pkgmetadata>
diff --git a/www-apache/mod_vdbh/mod_vdbh-1.0.3-r1.ebuild b/www-apache/mod_vdbh/mod_vdbh-1.0.3-r1.ebuild
new file mode 100644
index 000000000000..538cfbfc19cb
--- /dev/null
+++ b/www-apache/mod_vdbh/mod_vdbh-1.0.3-r1.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit apache-module
+
+KEYWORDS="ppc x86"
+
+DESCRIPTION="An Apache2 module for mass virtual hosting using a MySQL database"
+HOMEPAGE="http://www.synthemesc.com/mod_vdbh/"
+SRC_URI="http://www.synthemesc.com/downloads/${PN}/${P}.tar.gz"
+LICENSE="Apache-1.1"
+SLOT="0"
+IUSE=""
+
+S="${WORKDIR}/${PN}"
+
+DEPEND="virtual/mysql
+ >=sys-libs/zlib-1.1.4"
+RDEPEND="${DEPEND}"
+
+APXS2_ARGS="-DHAVE_STDDEF_H -I/usr/include/mysql -Wl,-lmysqlclient -c ${PN}.c"
+
+APACHE2_MOD_CONF="21_mod_vdbh"
+APACHE2_MOD_DEFINE="VDBH"
+
+DOCFILES="AUTHORS README"
+
+need_apache2
diff --git a/www-apache/mod_vhost_ldap/Manifest b/www-apache/mod_vhost_ldap/Manifest
new file mode 100644
index 000000000000..0945e28eacdd
--- /dev/null
+++ b/www-apache/mod_vhost_ldap/Manifest
@@ -0,0 +1 @@
+DIST mod_vhost_ldap-2.4.0.tar.xz 9628 SHA256 5f4394bb3b6ad8c1e380ef5a7ee3a45e8310d83beea98f228ca022f196e039d3 SHA512 b9715881ca704207fd852dfa2370dd71993bc85f390b353201aaf40c4252978e720abeda8b29b6c676f3cac66e50b67989825d7a6d3992829fbbfed725c75330 WHIRLPOOL 05dc93d086fbc90e95903dda3ec9b81ec2255667455cd09cf6fb96b3bb4e6e55a6da97f290b73f298242338e91dc378347dfea0b9e9d8d5ba493f90c2c0d2bf5
diff --git a/www-apache/mod_vhost_ldap/files/99_mod_vhost_ldap.conf b/www-apache/mod_vhost_ldap/files/99_mod_vhost_ldap.conf
new file mode 100644
index 000000000000..dd563150dcbc
--- /dev/null
+++ b/www-apache/mod_vhost_ldap/files/99_mod_vhost_ldap.conf
@@ -0,0 +1,10 @@
+<IfDefine VHOST_LDAP>
+LoadModule vhost_ldap_module modules/mod_vhost_ldap.so
+
+VhostLDAPEnabled on
+VhostLDAPUrl "ldap://127.0.0.1/ou=vhosts,ou=web,dc=localhost"
+VhostLdapBindDN "cn=admin,dc=localhost"
+VhostLDAPBindPassword "changeme"
+</IfDefine>
+
+# vim: ts=4 filetype=apache
diff --git a/www-apache/mod_vhost_ldap/metadata.xml b/www-apache/mod_vhost_ldap/metadata.xml
new file mode 100644
index 000000000000..4538a68724a6
--- /dev/null
+++ b/www-apache/mod_vhost_ldap/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer><email>maintainer-needed@gentoo.org</email></maintainer>
+</pkgmetadata>
diff --git a/www-apache/mod_vhost_ldap/mod_vhost_ldap-2.4.0.ebuild b/www-apache/mod_vhost_ldap/mod_vhost_ldap-2.4.0.ebuild
new file mode 100644
index 000000000000..e5d61228e287
--- /dev/null
+++ b/www-apache/mod_vhost_ldap/mod_vhost_ldap-2.4.0.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit apache-module depend.apache
+
+DESCRIPTION="Store and configure Apache virtual hosts using LDAP"
+HOMEPAGE="http://modvhostldap.alioth.debian.org/"
+SRC_URI="http://dev.gentoo.org/~mjo/distfiles/${P}.tar.xz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+APACHE2_MOD_CONF="99_${PN}"
+APACHE2_MOD_DEFINE="VHOST_LDAP LDAP"
+
+DOCFILES="AUTHORS ChangeLog README"
+
+# apache[ldap] is needed to run, but not to compile.
+DEPEND=""
+RDEPEND="=www-servers/apache-2*[ldap]"
+
+need_apache2
+
+src_prepare() {
+ sed -i "s/MOD_VHOST_LDAP_VERSION/\"${PV}\"/g" "${PN}.c" || \
+ die "failed to sed version string"
+}
+
+src_install() {
+ apache-module_src_install
+ insinto /etc/openldap/schema
+ doins mod_vhost_ldap.schema
+}
+
+pkg_postinst() {
+ apache-module_pkg_postinst
+ einfo
+ einfo "Your LDAP server needs to include mod_vhost_ldap.schema and should"
+ einfo "also maintain indices on apacheServerName and apacheServerAlias."
+ einfo
+}
diff --git a/www-apache/mod_whatkilledus/Manifest b/www-apache/mod_whatkilledus/Manifest
new file mode 100644
index 000000000000..e1cf2652eead
--- /dev/null
+++ b/www-apache/mod_whatkilledus/Manifest
@@ -0,0 +1 @@
+DIST wku_bt-2.01.zip 933169 SHA256 3033a07b284a67e519e3b2d09a255b9cd8ce5902d3d9971d4cf182dec75c7d27 SHA512 c1bde8a26b395fc5fc66cd83c9282a8c519f34d27bef628ec502cec4245a7d446300178c9c94a5c5c0eb817bb8dd146587607760f9c9e780986d6ec53f03fb4c WHIRLPOOL dc2fa4debac883909f084562ffa0d9ab9e7f60a76bd02ee0054a0258444165f6fa63490bfefeaa03fe476ca9abc1ba93e2ad60858ba3ee4611b227b48e49bf1f
diff --git a/www-apache/mod_whatkilledus/files/10_mod_whatkilledus.conf b/www-apache/mod_whatkilledus/files/10_mod_whatkilledus.conf
new file mode 100644
index 000000000000..4d99d8af4523
--- /dev/null
+++ b/www-apache/mod_whatkilledus/files/10_mod_whatkilledus.conf
@@ -0,0 +1,5 @@
+<IfDefine WHATKILLEDUS>
+ LoadModule whatkilledus_module modules/mod_whatkilledus.so
+ EnableExceptionHook On
+ WKULogfile /var/log/apache2/whatkilledus.log
+</IfDefine>
diff --git a/www-apache/mod_whatkilledus/files/gen_test_char.c b/www-apache/mod_whatkilledus/files/gen_test_char.c
new file mode 100644
index 000000000000..587583aed609
--- /dev/null
+++ b/www-apache/mod_whatkilledus/files/gen_test_char.c
@@ -0,0 +1,121 @@
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "apr.h"
+#include "apr_lib.h"
+
+#if APR_HAVE_STDIO_H
+#include <stdio.h>
+#endif
+#if APR_HAVE_STRING_H
+#include <string.h>
+#endif
+
+/* A bunch of functions in util.c scan strings looking for certain characters.
+ * To make that more efficient we encode a lookup table.
+ */
+#define T_ESCAPE_SHELL_CMD (0x01)
+#define T_ESCAPE_PATH_SEGMENT (0x02)
+#define T_OS_ESCAPE_PATH (0x04)
+#define T_HTTP_TOKEN_STOP (0x08)
+#define T_ESCAPE_LOGITEM (0x10)
+#define T_ESCAPE_FORENSIC (0x20)
+
+int main(int argc, char *argv[])
+{
+ unsigned c;
+ unsigned char flags;
+
+ printf("/* this file is automatically generated by gen_test_char, "
+ "do not edit */\n"
+ "#define T_ESCAPE_SHELL_CMD (%u)\n"
+ "#define T_ESCAPE_PATH_SEGMENT (%u)\n"
+ "#define T_OS_ESCAPE_PATH (%u)\n"
+ "#define T_HTTP_TOKEN_STOP (%u)\n"
+ "#define T_ESCAPE_LOGITEM (%u)\n"
+ "#define T_ESCAPE_FORENSIC (%u)\n"
+ "\n"
+ "static const unsigned char test_char_table[256] = {",
+ T_ESCAPE_SHELL_CMD,
+ T_ESCAPE_PATH_SEGMENT,
+ T_OS_ESCAPE_PATH,
+ T_HTTP_TOKEN_STOP,
+ T_ESCAPE_LOGITEM,
+ T_ESCAPE_FORENSIC);
+
+ for (c = 0; c < 256; ++c) {
+ flags = 0;
+ if (c % 20 == 0)
+ printf("\n ");
+
+ /* escape_shell_cmd */
+#if defined(WIN32) || defined(OS2)
+ /* Win32/OS2 have many of the same vulnerable characters
+ * as Unix sh, plus the carriage return and percent char.
+ * The proper escaping of these characters varies from unix
+ * since Win32/OS2 use carets or doubled-double quotes,
+ * and neither lf nor cr can be escaped. We escape unix
+ * specific as well, to assure that cross-compiled unix
+ * applications behave similiarly when invoked on win32/os2.
+ *
+ * Rem please keep in-sync with apr's list in win32/filesys.c
+ */
+ if (c && strchr("&;`'\"|*?~<>^()[]{}$\\\n\r%", c)) {
+ flags |= T_ESCAPE_SHELL_CMD;
+ }
+#else
+ if (c && strchr("&;`'\"|*?~<>^()[]{}$\\\n", c)) {
+ flags |= T_ESCAPE_SHELL_CMD;
+ }
+#endif
+
+ if (!apr_isalnum(c) && !strchr("$-_.+!*'(),:@&=~", c)) {
+ flags |= T_ESCAPE_PATH_SEGMENT;
+ }
+
+ if (!apr_isalnum(c) && !strchr("$-_.+!*'(),:@&=/~", c)) {
+ flags |= T_OS_ESCAPE_PATH;
+ }
+
+ /* these are the "tspecials" from RFC2068 */
+ if (c && (apr_iscntrl(c) || strchr(" \t()<>@,;:\\/[]?={}", c))) {
+ flags |= T_HTTP_TOKEN_STOP;
+ }
+
+ /* For logging, escape all control characters,
+ * double quotes (because they delimit the request in the log file)
+ * backslashes (because we use backslash for escaping)
+ * and 8-bit chars with the high bit set
+ */
+ if (c && (!apr_isprint(c) || c == '"' || c == '\\' || apr_iscntrl(c))) {
+ flags |= T_ESCAPE_LOGITEM;
+ }
+
+ /* For forensic logging, escape all control characters, top bit set,
+ * :, | (used as delimiters) and % (used for escaping).
+ */
+ if (!apr_isprint(c) || c == ':' || c == '|' || c == '%'
+ || apr_iscntrl(c) || !c) {
+ flags |= T_ESCAPE_FORENSIC;
+ }
+
+ printf("%u%c", flags, (c < 255) ? ',' : ' ');
+ }
+
+ printf("\n};\n");
+
+ return 0;
+}
diff --git a/www-apache/mod_whatkilledus/metadata.xml b/www-apache/mod_whatkilledus/metadata.xml
new file mode 100644
index 000000000000..4538a68724a6
--- /dev/null
+++ b/www-apache/mod_whatkilledus/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer><email>maintainer-needed@gentoo.org</email></maintainer>
+</pkgmetadata>
diff --git a/www-apache/mod_whatkilledus/mod_whatkilledus-2.01.ebuild b/www-apache/mod_whatkilledus/mod_whatkilledus-2.01.ebuild
new file mode 100644
index 000000000000..10cb83d50ee6
--- /dev/null
+++ b/www-apache/mod_whatkilledus/mod_whatkilledus-2.01.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit apache-module depend.apache
+
+DESCRIPTION="Debug segmentation faults in Apache threads"
+HOMEPAGE="http://emptyhammock.com/projects/httpd/diag/"
+SRC_URI="http://emptyhammock.com/downloads/wku_bt-${PV}.zip"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND=">=www-apache/mod_backtrace-2.01
+ =www-servers/apache-2*[debug]"
+DEPEND="${RDEPEND}
+ app-arch/unzip"
+
+APACHE2_MOD_CONF="10_${PN}"
+APACHE2_MOD_DEFINE="BACKTRACE WHATKILLEDUS"
+
+need_apache2
+
+S="${WORKDIR}/wku_bt-${PV}"
+
+src_compile() {
+ APXS2_ARGS="-c ${PN}.c diag.c -ldl"
+ apache-module_src_compile
+}
diff --git a/www-apache/mod_wsgi/Manifest b/www-apache/mod_wsgi/Manifest
new file mode 100644
index 000000000000..f5999b3ea6ee
--- /dev/null
+++ b/www-apache/mod_wsgi/Manifest
@@ -0,0 +1,5 @@
+DIST mod_wsgi-3.5.tar.gz 135875 SHA256 f0674c38f0f568ece55610bcc6a775c179835c4cba23aa7f876d2a2a8520bf93 SHA512 27002e933883c96bc06877f2f83a8bef816d1f7080ff01c89cc9f20dd1049f53b21a028cb156159f2a4c374048f5e52dce48b52d5b9584fbd0ca9455c285136b WHIRLPOOL 1790cf04017e6094d086f2cc6778bcde65d4b69619ba886eb14be02f3a1e5268027481626aaffb118f0a30385b334ac3638bd800776fa184e0c477fe6f3122d6
+DIST mod_wsgi-4.3.0.tar.gz 590804 SHA256 a14d5fe18e7f75598977a0d75340507839c0bccac2b05610fe73f8a795c211e5 SHA512 4cd24cad6d082d6d19fb0567fc6ddb2660a144a5d5174cf68a173a0847aae775b9642e34faba15453ea6cdc04bd88e2924dda5524ae4a63dd2cbc1f93c2664fd WHIRLPOOL 6e259e101637b1c9b0134c08ffb0d99d213a990b383a2cc53d437bb52be9c08ecf6e1b29e133578c0650be4c001be3f747ce7c07f0bf8264c2015c3413769688
+DIST mod_wsgi-4.4.10.tar.gz 633173 SHA256 150091d399d37360108b5e75ec1872251706d75e6c24c9c5e06b4e6d90ecb2c4 SHA512 30c36fab69d50815df18f7323dcc71a2788e58031ea70fd0c9a8fc411527d3532cdecd3a619cf5f70a58991a6e120cbffe8f16a3eb9ee13457956f2afdc07776 WHIRLPOOL 70f61c16457af06c730866c66414c303b60ffd89f9c39eb10b264a019fd9eabb1343424c995eafae3de7d6e8b0c6533a3b2e5060122cd39ba06556e657744277
+DIST mod_wsgi-4.4.6.tar.gz 618514 SHA256 5721d28b3b18be06514228f0453b0dc4aa7a18540cf63596288f5d6b5c5d644a SHA512 e0f22e47368f4e15c3773a419d72916e97acabf625e7ba732825dcad1791d299b9089ab45a0d77e5eee047491ef65ab30066e8a740f94f387969ec24625c8e78 WHIRLPOOL 69e1a4d683706c08b5539e41c7e52f45a35389139490fe0edb39579a45af19cf9241904bb1e14aa8114c9d8a2a84d31b24c67f4a6ebe3a267b1d75e60d8db2f2
+DIST mod_wsgi-4.4.9.tar.gz 623831 SHA256 6d62cc584ca3a06e5d27799db594728d66735fdfd1930e50b9853e82019a388a SHA512 346ba680bdac59695258849594f109f9a7886ac863944895978610a3ff33c78b687842beb32fc5e4a044893c5b7f43bc08ac60b7d481ae1a46866071794de7c0 WHIRLPOOL 1aaa80e1f6b321674cfd91bfa0056ba135f849fbb374309f4be96e1664d70b923525bf8b7396574757e8b5c7e5a2eb9f54c2f553e32b25e81f98ec675c021ea1
diff --git a/www-apache/mod_wsgi/files/70_mod_wsgi.conf b/www-apache/mod_wsgi/files/70_mod_wsgi.conf
new file mode 100644
index 000000000000..3fabc5967fca
--- /dev/null
+++ b/www-apache/mod_wsgi/files/70_mod_wsgi.conf
@@ -0,0 +1,5 @@
+<IfDefine WSGI>
+LoadModule wsgi_module modules/mod_wsgi.so
+</IfDefine>
+
+# vim: ts=4 filetype=apache
diff --git a/www-apache/mod_wsgi/metadata.xml b/www-apache/mod_wsgi/metadata.xml
new file mode 100644
index 000000000000..bd863f43330b
--- /dev/null
+++ b/www-apache/mod_wsgi/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>djc@gentoo.org</email>
+ <name>Dirkjan Ochtman</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="pypi">mod_wsgi</remote-id>
+ <remote-id type="github">GrahamDumpleton/mod_wsgi</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/www-apache/mod_wsgi/mod_wsgi-3.5.ebuild b/www-apache/mod_wsgi/mod_wsgi-3.5.ebuild
new file mode 100644
index 000000000000..c97a9c6e3bac
--- /dev/null
+++ b/www-apache/mod_wsgi/mod_wsgi-3.5.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+PYTHON_COMPAT=( python2_7 python3_3 python3_4 )
+PYTHON_REQ_USE="threads"
+
+inherit apache-module eutils python-single-r1
+
+DESCRIPTION="An Apache2 module for running Python WSGI applications"
+HOMEPAGE="http://code.google.com/p/modwsgi/"
+SRC_URI="https://github.com/GrahamDumpleton/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND=""
+
+APACHE2_MOD_CONF="70_${PN}"
+APACHE2_MOD_DEFINE="WSGI"
+
+DOCFILES="README"
+
+need_apache2
+
+src_configure() {
+ econf --with-apxs=${APXS} --with-python=${PYTHON}
+}
+
+src_compile() {
+ default
+}
diff --git a/www-apache/mod_wsgi/mod_wsgi-4.3.0.ebuild b/www-apache/mod_wsgi/mod_wsgi-4.3.0.ebuild
new file mode 100644
index 000000000000..e62cb8111008
--- /dev/null
+++ b/www-apache/mod_wsgi/mod_wsgi-4.3.0.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+PYTHON_COMPAT=( python2_7 python3_3 python3_4 )
+PYTHON_REQ_USE="threads"
+
+inherit apache-module eutils python-single-r1
+
+DESCRIPTION="An Apache2 module for running Python WSGI applications"
+HOMEPAGE="http://code.google.com/p/modwsgi/"
+SRC_URI="https://github.com/GrahamDumpleton/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND=""
+
+APACHE2_MOD_CONF="70_${PN}"
+APACHE2_MOD_DEFINE="WSGI"
+APACHE2_MOD_FILE="${S}/src/server/.libs/${PN}.so"
+
+DOCFILES="README.rst"
+
+need_apache2
+
+src_configure() {
+ econf --with-apxs=${APXS} --with-python=${PYTHON}
+}
+
+src_compile() {
+ default
+}
diff --git a/www-apache/mod_wsgi/mod_wsgi-4.4.10.ebuild b/www-apache/mod_wsgi/mod_wsgi-4.4.10.ebuild
new file mode 100644
index 000000000000..2ec68f65d60c
--- /dev/null
+++ b/www-apache/mod_wsgi/mod_wsgi-4.4.10.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+PYTHON_COMPAT=( python2_7 python3_3 python3_4 )
+PYTHON_REQ_USE="threads"
+
+inherit apache-module eutils python-single-r1
+
+DESCRIPTION="An Apache2 module for running Python WSGI applications"
+HOMEPAGE="http://code.google.com/p/modwsgi/"
+SRC_URI="https://github.com/GrahamDumpleton/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND=""
+
+APACHE2_MOD_CONF="70_${PN}"
+APACHE2_MOD_DEFINE="WSGI"
+APACHE2_MOD_FILE="${S}/src/server/.libs/${PN}.so"
+
+DOCFILES="README.rst"
+
+need_apache2
+
+src_configure() {
+ econf --with-apxs=${APXS} --with-python=${PYTHON}
+}
+
+src_compile() {
+ default
+}
diff --git a/www-apache/mod_wsgi/mod_wsgi-4.4.6.ebuild b/www-apache/mod_wsgi/mod_wsgi-4.4.6.ebuild
new file mode 100644
index 000000000000..2ec68f65d60c
--- /dev/null
+++ b/www-apache/mod_wsgi/mod_wsgi-4.4.6.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+PYTHON_COMPAT=( python2_7 python3_3 python3_4 )
+PYTHON_REQ_USE="threads"
+
+inherit apache-module eutils python-single-r1
+
+DESCRIPTION="An Apache2 module for running Python WSGI applications"
+HOMEPAGE="http://code.google.com/p/modwsgi/"
+SRC_URI="https://github.com/GrahamDumpleton/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND=""
+
+APACHE2_MOD_CONF="70_${PN}"
+APACHE2_MOD_DEFINE="WSGI"
+APACHE2_MOD_FILE="${S}/src/server/.libs/${PN}.so"
+
+DOCFILES="README.rst"
+
+need_apache2
+
+src_configure() {
+ econf --with-apxs=${APXS} --with-python=${PYTHON}
+}
+
+src_compile() {
+ default
+}
diff --git a/www-apache/mod_wsgi/mod_wsgi-4.4.9.ebuild b/www-apache/mod_wsgi/mod_wsgi-4.4.9.ebuild
new file mode 100644
index 000000000000..e62cb8111008
--- /dev/null
+++ b/www-apache/mod_wsgi/mod_wsgi-4.4.9.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+PYTHON_COMPAT=( python2_7 python3_3 python3_4 )
+PYTHON_REQ_USE="threads"
+
+inherit apache-module eutils python-single-r1
+
+DESCRIPTION="An Apache2 module for running Python WSGI applications"
+HOMEPAGE="http://code.google.com/p/modwsgi/"
+SRC_URI="https://github.com/GrahamDumpleton/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND=""
+
+APACHE2_MOD_CONF="70_${PN}"
+APACHE2_MOD_DEFINE="WSGI"
+APACHE2_MOD_FILE="${S}/src/server/.libs/${PN}.so"
+
+DOCFILES="README.rst"
+
+need_apache2
+
+src_configure() {
+ econf --with-apxs=${APXS} --with-python=${PYTHON}
+}
+
+src_compile() {
+ default
+}
diff --git a/www-apache/mod_xml2enc/Manifest b/www-apache/mod_xml2enc/Manifest
new file mode 100644
index 000000000000..61b411dfa8eb
--- /dev/null
+++ b/www-apache/mod_xml2enc/Manifest
@@ -0,0 +1,2 @@
+DIST mod_xml2enc.c 22380 SHA256 54d2d82c54f60e73eaddb69c00d2fd7be1786c449d5c7bbe045b30e56d19ba24 SHA512 b38d81ff419e9c00e302eb555715181cf2157af2d15a15b86d34f948c0c2f55de237234a24140b9fc2c1d3d46d688c4e9c4ab74af34b451677224a30b1b08582 WHIRLPOOL 6c925558f56f3f4c934ab6b50f055bac15eaf09a837500aae900d9c451ab357bc53f0d1c44759f4eb66f5c17d91a46f64cd9467c7a50d2dd8aa6d812bc2340d2
+DIST mod_xml2enc.h 1479 SHA256 3a4106a2de484812b6c98aa0845333be83e5f659eebe37678986b8829ee3d4a9 SHA512 01961c3f788ad4a53c2c8f4d9ddebb0333e75b8589df0ab0eb80b53ce781fa5d34b7908d082feeedc7d8a8582a8b798af26b9af107423dad99b83df5c6d5e7d3 WHIRLPOOL 539350c39c7198240cd7eabd43c3bce26d15456064b6dd68757fa70001072b1161acd388913a7941f367e56dcb00cf01bcc442d8da206ce1b2d54cbc7bcd99bf
diff --git a/www-apache/mod_xml2enc/metadata.xml b/www-apache/mod_xml2enc/metadata.xml
new file mode 100644
index 000000000000..2d6c34cc4459
--- /dev/null
+++ b/www-apache/mod_xml2enc/metadata.xml
@@ -0,0 +1,7 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>maintainer-needed@gentoo.org</email>
+ </maintainer>
+</pkgmetadata>
diff --git a/www-apache/mod_xml2enc/mod_xml2enc-1.0.3.ebuild b/www-apache/mod_xml2enc/mod_xml2enc-1.0.3.ebuild
new file mode 100644
index 000000000000..180dd15efca1
--- /dev/null
+++ b/www-apache/mod_xml2enc/mod_xml2enc-1.0.3.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit apache-module
+
+DESCRIPTION="An Apache2 module to provide libxml2 encoding"
+HOMEPAGE="http://apache.webthing.com/mod_xml2enc/"
+SRC_URI="http://apache.webthing.com/svn/apache/filters/mod_xml2enc.h
+ http://apache.webthing.com/svn/apache/filters/mod_xml2enc.c"
+RESTRICT="mirror"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+DEPEND="app-arch/bzip2
+ dev-libs/libxml2"
+RDEPEND="${DEPEND}"
+
+#APACHE2_MOD_CONF="27_${PN}"
+#APACHE2_MOD_DEFINE="XML2ENC"
+
+need_apache2
+
+S="${WORKDIR}"/${PN}
+
+src_unpack() {
+ mkdir "${WORKDIR}"/${PN}
+ cp "${DISTDIR}/mod_xml2enc.h" "${WORKDIR}"/${PN}
+ cp "${DISTDIR}/mod_xml2enc.c" "${WORKDIR}"/${PN}
+}
+
+src_compile() {
+ APXS2_ARGS="$(xml2-config --cflags) -c ${PN}.c"
+ apache-module_src_compile
+}
diff --git a/www-apache/mod_xsendfile/Manifest b/www-apache/mod_xsendfile/Manifest
new file mode 100644
index 000000000000..e4fc95a08bb5
--- /dev/null
+++ b/www-apache/mod_xsendfile/Manifest
@@ -0,0 +1 @@
+DIST mod_xsendfile-1.0b1.tar.gz 14883 SHA256 4646d6dfa0d57b2a45a9881dcf932c065e712f68effe649e3c7903b16103f98b SHA512 96745a5c753af329cabc10b1551e199425abf28c058222e118e67c604a53cfebb4fd8e27558caa58269ca8b4ca805ac6c4a71654c8414331c095bd600a4b3914 WHIRLPOOL 7aa9294b02951c1f1c617d497f655fed15c7651c061622012b9a3482bb9f010dee809b63777262e2d3faca2934a3721c5e8128780dcdd6fe96d032ab03cdf846
diff --git a/www-apache/mod_xsendfile/files/50_mod_xsendfile.conf b/www-apache/mod_xsendfile/files/50_mod_xsendfile.conf
new file mode 100644
index 000000000000..eda65879a6ff
--- /dev/null
+++ b/www-apache/mod_xsendfile/files/50_mod_xsendfile.conf
@@ -0,0 +1,20 @@
+<IfDefine XSENDFILE>
+LoadModule xsendfile_module modules/mod_xsendfile.so
+
+# Enables or disables header processing
+# XSendFile on|off
+XSendFile on
+# Ignore script provided Etag headers
+# XSendFileIgnoreEtag on|off
+#
+# Ignore script provided LastModified headers
+# XSendFileIgnoreLastModified on|off
+#
+# White-list more paths
+# XSendFilePath absolute path
+#
+# XSendFilePath /var/infiniband_mount/shared/LUN1/
+#
+</IfDefine>
+
+# vim: ts=4 filetype=apache
diff --git a/www-apache/mod_xsendfile/metadata.xml b/www-apache/mod_xsendfile/metadata.xml
new file mode 100644
index 000000000000..8bca261d7b50
--- /dev/null
+++ b/www-apache/mod_xsendfile/metadata.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>proxy-maintainers</herd>
+ <maintainer>
+ <email>andreis.vinogradovs@gmail.com</email>
+ <name>Andreis Vinogradovs</name>
+ </maintainer>
+ <maintainer>
+ <email>maksbotan@gentoo.org</email>
+ <name>Maxim Koltsov</name>
+ </maintainer>
+ <maintainer>
+ <email>qnikst@gentoo.org</email>
+ <name>Alexander Vershilov</name>
+ </maintainer>
+
+</pkgmetadata>
diff --git a/www-apache/mod_xsendfile/mod_xsendfile-1.0_beta1.ebuild b/www-apache/mod_xsendfile/mod_xsendfile-1.0_beta1.ebuild
new file mode 100644
index 000000000000..8911b4ed9321
--- /dev/null
+++ b/www-apache/mod_xsendfile/mod_xsendfile-1.0_beta1.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit apache-module
+
+MY_PV="1.0b1"
+DESCRIPTION="Apache2 module that processes X-SENDFILE headers registered by the original output handler"
+HOMEPAGE="https://tn123.org/mod_xsendfile/"
+SRC_URI="https://tn123.org/mod_xsendfile/beta/${PN}-${MY_PV}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="amd64 sparc x86 ~amd64-linux"
+IUSE=""
+
+S=${WORKDIR}
+
+RDEPEND="${DEPEND}"
+
+APACHE2_MOD_CONF="50_${PN}"
+APACHE2_MOD_DEFINE="XSENDFILE"
+
+DOCFILES="docs/Readme.html"
+
+need_apache2
diff --git a/www-apache/modsec-flameeyes/Manifest b/www-apache/modsec-flameeyes/Manifest
new file mode 100644
index 000000000000..92b1c035c4d1
--- /dev/null
+++ b/www-apache/modsec-flameeyes/Manifest
@@ -0,0 +1 @@
+DIST modsec-flameeyes-20130216.tar.gz 18716 SHA256 0434015d269eaa3d18af977c9c7db4600bf04331a50fd3a3541e4104cc345246 SHA512 196a8176da09340c5496a3056deb473c69721fdd6c891b6bec6dd5459063dbd61b00eb9559ba0e88413678633cd90496cb0e1b2828442635d31d68dc949013db WHIRLPOOL 84d36cb05e70aca0b2a80754245ea20ae84fa1f3cd2df62cc0630b6addf6353fcc769cdda2e0422f6b8f4f9035844bd81e670efde81c89035e01166595a5ac6b
diff --git a/www-apache/modsec-flameeyes/metadata.xml b/www-apache/modsec-flameeyes/metadata.xml
new file mode 100644
index 000000000000..7503e0187752
--- /dev/null
+++ b/www-apache/modsec-flameeyes/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>flameeyes@gentoo.org</email>
+ <name>Diego E. Pettenò</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/www-apache/modsec-flameeyes/modsec-flameeyes-20130216.ebuild b/www-apache/modsec-flameeyes/modsec-flameeyes-20130216.ebuild
new file mode 100644
index 000000000000..fb35d520c5e1
--- /dev/null
+++ b/www-apache/modsec-flameeyes/modsec-flameeyes-20130216.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit readme.gentoo
+
+GITHUB_USER=Flameeyes
+GITHUB_PROJECT=${PN}
+
+EGIT_REPO_URI="https://github.com/${GITHUB_USER}/${GITHUB_PROJECT}.git"
+
+DESCRIPTION="Flameeyes's Ruleset for ModSecurity"
+HOMEPAGE="http://www.flameeyes.eu/projects/modsec"
+SRC_URI="https://github.com/${GITHUB_USER}/${GITHUB_PROJECT}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="CC-BY-SA-3.0"
+SLOT="0"
+KEYWORDS="~amd64"
+
+RDEPEND=">=www-apache/mod_security-2.5.1"
+DEPEND=""
+
+RULESDIR=/etc/modsecurity/flameeyes
+
+DOC_CONTENTS="To enable the ruleset, define MODSEC_FLAMEEYES in
+/etc/conf.d/apache2.
+
+If you do not use www-apache/modsecurity-crs you want also to uncomment
+the init configuration file in /etc/apache2/modules/81_${PN}.conf."
+
+src_install() {
+ insinto "${RULESDIR}"
+ doins -r rules optional
+
+ dodoc README.md
+
+ cat - > "${T}/81_${PN}.conf" <<EOF
+<IfDefine MODSEC_FLAMEEYES>
+
+# Uncomment this if you don't use the CRS
+# Include /etc/modsecurity/flameeyes/optional/flameeyes_init.conf
+
+Include /etc/modsecurity/flameeyes/rules/*.conf
+
+# -*- apache -*-
+# vim: ts=4 filetype=apache
+
+EOF
+
+ insinto /etc/apache2/modules.d/
+ doins "${T}/81_${PN}.conf"
+
+ readme.gentoo_create_doc
+}
diff --git a/www-apache/modsec-flameeyes/modsec-flameeyes-99999999.ebuild b/www-apache/modsec-flameeyes/modsec-flameeyes-99999999.ebuild
new file mode 100644
index 000000000000..886ca12cb625
--- /dev/null
+++ b/www-apache/modsec-flameeyes/modsec-flameeyes-99999999.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit readme.gentoo git-2
+
+GITHUB_USER=Flameeyes
+GITHUB_PROJECT=${PN}
+
+EGIT_REPO_URI="https://github.com/${GITHUB_USER}/${GITHUB_PROJECT}.git"
+
+DESCRIPTION="Flameeyes's Ruleset for ModSecurity"
+HOMEPAGE="http://www.flameeyes.eu/projects/modsec"
+#SRC_URI="https://github.com/${GITHUB_USER}/${GITHUB_PROJECT}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="CC-BY-SA-3.0"
+SLOT="0"
+KEYWORDS=""
+
+RDEPEND=">=www-apache/mod_security-2.5.1"
+DEPEND=""
+
+RULESDIR=/etc/modsecurity/flameeyes
+
+DOC_CONTENTS="To enable the ruleset, define MODSEC_FLAMEEYES in
+/etc/conf.d/apache2.
+
+If you do not use www-apache/modsecurity-crs you want also to uncomment
+the init configuration file in /etc/apache2/modules/81_${PN}.conf."
+
+src_install() {
+ insinto "${RULESDIR}"
+ doins -r rules optional
+
+ dodoc README.md
+
+ cat - > "${T}/81_${PN}.conf" <<EOF
+<IfDefine MODSEC_FLAMEEYES>
+
+# Uncomment this if you don't use the CRS
+# Include /etc/modsecurity/flameeyes/optional/flameeyes_init.conf
+
+Include /etc/modsecurity/flameeyes/rules/*.conf
+
+# -*- apache -*-
+# vim: ts=4 filetype=apache
+
+EOF
+
+ insinto /etc/apache2/modules.d/
+ doins "${T}/81_${PN}.conf"
+
+ readme.gentoo_create_doc
+}
diff --git a/www-apache/modsecurity-crs/Manifest b/www-apache/modsecurity-crs/Manifest
new file mode 100644
index 000000000000..c3cd8410c6a6
--- /dev/null
+++ b/www-apache/modsecurity-crs/Manifest
@@ -0,0 +1,2 @@
+DIST modsecurity-crs-2.2.6.tar.gz 291070 SHA256 1c837fc7ace28f732b5034c90a17635e31fe3c9a45425c079fd1fd6bae01b790 SHA512 0e6c2735814dd24ba2329bc756e382b0430937a703d492b2ac00f95af6598903961b43013e99cd49240fe6b7a5439a7b1b3e79c3b7a48828465252dafd586165 WHIRLPOOL d8c85f8e6db07ecbc5a9a680e843f485d87294c71ceeb84aa83e562441ea78db477f9850431ded67371fbe455438fb89fedb5d3070e524abebe53b3c9a039f72
+DIST modsecurity-crs-2.2.7.tar.gz 294137 SHA256 54bc74815d6e6c3b476aec673a48e3ce08ee82b76bfe941408efab757aa8a0f7 SHA512 d0d3dac1b391c8ab730cc16546c9508d93c85dd674b2750d12fff99c17e5575b36bea0cf00e06fdd20c2db5dfdbdc3fd7bbaa26502988617632acfde1ee88927 WHIRLPOOL fc72bdbd5c79dffa0b2c65893cb8cdab0708705ce48ca3d49115339a5b4ff8cbe7cc42bcb49abd966243a2e48cb2af290ea125c6de4b185eb8b1c20e7eb66057
diff --git a/www-apache/modsecurity-crs/metadata.xml b/www-apache/modsecurity-crs/metadata.xml
new file mode 100644
index 000000000000..e00e0a6a260b
--- /dev/null
+++ b/www-apache/modsecurity-crs/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>flameeyes@gentoo.org</email>
+ <name>Diego E. Pettenò</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">SpiderLabs/owasp-modsecurity-crs</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/www-apache/modsecurity-crs/modsecurity-crs-2.2.6-r1.ebuild b/www-apache/modsecurity-crs/modsecurity-crs-2.2.6-r1.ebuild
new file mode 100644
index 000000000000..e4b076aff6a2
--- /dev/null
+++ b/www-apache/modsecurity-crs/modsecurity-crs-2.2.6-r1.ebuild
@@ -0,0 +1,137 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+GITHUB_USER=SpiderLabs
+GITHUB_PROJECT=owasp-${PN}
+
+DESCRIPTION="Core Rule Set for ModSecurity"
+HOMEPAGE="http://www.owasp.org/index.php/Category:OWASP_ModSecurity_Core_Rule_Set_Project"
+SRC_URI="https://github.com/${GITHUB_USER}/${GITHUB_PROJECT}/tarball/v${PV} -> ${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="amd64 ppc sparc x86"
+IUSE="lua geoip"
+
+RDEPEND=">=www-apache/mod_security-2.7[lua?,geoip?]"
+DEPEND=""
+
+S="${WORKDIR}/${P}"
+
+RULESDIR=/etc/modsecurity
+LUADIR=/usr/share/${PN}/lua
+
+src_unpack() {
+ default
+ mv "${WORKDIR}/${GITHUB_USER}-${GITHUB_PROJECT}-"* "${P}" || die
+}
+
+src_prepare() {
+ if ! use lua; then
+ # comment out this since it's in the same file as another one we want to keep
+ sed -i -e "/id:'96000[456]'/s:^:#:" \
+ experimental_rules/modsecurity_crs_61_ip_forensics.conf || die
+
+ # remove these that rely on the presence of the lua files
+ rm \
+ experimental_rules/modsecurity_crs_16_scanner_integration.conf \
+ experimental_rules/modsecurity_crs_40_appsensor_detection_point_2.1_request_exception.conf \
+ experimental_rules/modsecurity_crs_41_advanced_filters.conf \
+ experimental_rules/modsecurity_crs_55_response_profiling.conf \
+ experimental_rules/modsecurity_crs_56_pvi_checks.conf \
+ || die
+ else
+ # fix up the path to the scripts; there seems to be no
+ # consistency at all on how the rules are loaded.
+ sed -i \
+ -e "s:/etc/apache2/modsecurity-crs/lua/:${LUADIR}/:" \
+ -e "s:profile_page_scripts.lua:${LUADIR}/\0:" \
+ -e "s:/usr/local/apache/conf/crs/lua/:${LUADIR}/:" \
+ -e "s:/usr/local/apache/conf/modsec_current/base_rules/:${LUADIR}/:" \
+ -e "s:/etc/apache2/modsecurity-crs/lua/:${LUADIR}/:" \
+ -e "s:\.\./lua/:${LUADIR}/:" \
+ *_rules/*.conf || die
+
+ # fix up the shebang on the scripts
+ sed -i -e "s:/opt/local/bin/lua:/usr/bin/lua:" \
+ lua/*.lua || die
+ fi
+
+ sed -i \
+ -e '/SecGeoLookupDb/s:^:#:' \
+ -e '/SecGeoLookupDb/a# Gentoo already defines it in 79_modsecurity.conf' \
+ experimental_rules/modsecurity_crs_61_ip_forensics.conf || die
+
+ if ! use geoip; then
+ if use lua; then
+ # only comment this out as the file is going to be used for other things
+ sed -i -e "/id:'960007'/,+1 s:^:#:" \
+ experimental_rules/modsecurity_crs_61_ip_forensics.conf || die
+ else
+ rm experimental_rules/modsecurity_crs_61_ip_forensics.conf || die
+ fi
+ fi
+}
+
+src_install() {
+ insinto "${RULESDIR}"
+ # slr_rules as of 2.2.6 have broken IDs that don't work with
+ # ModSecurity 2.7, but the rules require 2.7 to begin with.
+ doins -r base_rules optional_rules experimental_rules #slr_rules
+
+ insinto "${LUADIR}"
+ doins lua/*.lua
+
+ dodoc CHANGELOG README.md
+
+ (
+ cat - <<EOF
+<IfDefine SECURITY>
+EOF
+
+ cat modsecurity_crs_10_setup.conf.example
+
+ cat - <<EOF
+
+Include /etc/modsecurity/base_rules/*.conf
+
+# Include Trustwave SpiderLabs Research Team rules
+# Include /etc/modsecurity/slr_rules/*.conf
+# Not installed yet as of 2.2.6
+
+# Optionally use the other rules as well
+# Include /etc/modsecurity/optional_rules/*.conf
+# Include /etc/modsecurity/experimental_rules/*.conf
+</IfDefine>
+
+# -*- apache -*-
+# vim: ts=4 filetype=apache
+
+EOF
+ ) > "${T}"/"80_${PN}.conf"
+
+ insinto /etc/apache2/modules.d/
+ doins "${T}"/"80_${PN}.conf"
+}
+
+pkg_postinst() {
+ elog
+ elog "If you want to enable further rules, check the following directories:"
+ elog " ${RULESDIR}/optional_rules"
+ elog " ${RULESDIR}/experimental_rules"
+ elog ""
+ elog "Starting from version 2.0.9, the default for the Core Rule Set is again to block"
+ elog "when rules hit. If you wish to go back to the 2.0.8 method of anomaly scoring, you"
+ elog "should change 80_${PN}.conf so that you have these settings enabled:"
+ elog ""
+ elog " #SecDefaultAction \"phase:2,deny,log\""
+ elog " SecAction \"phase:1,t:none,nolog,pass,setvar:tx.anomaly_score_blocking=on\""
+ elog ""
+ elog "Starting from version 2.1.2 rules are installed, for consistency, under"
+ elog "/etc/modsecurity, and can be configured with the following file:"
+ elog " /etc/apache2/modules.d/80_${PN}.conf"
+ elog ""
+}
diff --git a/www-apache/modsecurity-crs/modsecurity-crs-2.2.7.ebuild b/www-apache/modsecurity-crs/modsecurity-crs-2.2.7.ebuild
new file mode 100644
index 000000000000..28d3e2c3b312
--- /dev/null
+++ b/www-apache/modsecurity-crs/modsecurity-crs-2.2.7.ebuild
@@ -0,0 +1,132 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+GITHUB_USER=SpiderLabs
+GITHUB_PROJECT=owasp-${PN}
+
+DESCRIPTION="Core Rule Set for ModSecurity"
+HOMEPAGE="http://www.owasp.org/index.php/Category:OWASP_ModSecurity_Core_Rule_Set_Project"
+SRC_URI="https://github.com/${GITHUB_USER}/${GITHUB_PROJECT}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="amd64 ppc sparc x86"
+IUSE="lua geoip"
+
+RDEPEND=">=www-apache/mod_security-2.7[lua?,geoip?]"
+DEPEND=""
+
+S="${WORKDIR}/${GITHUB_PROJECT}-${PV}"
+
+RULESDIR=/etc/modsecurity
+LUADIR=/usr/share/${PN}/lua
+
+src_prepare() {
+ if ! use lua; then
+ # comment out this since it's in the same file as another one we want to keep
+ sed -i -e "/id:'96000[456]'/s:^:#:" \
+ experimental_rules/modsecurity_crs_61_ip_forensics.conf || die
+
+ # remove these that rely on the presence of the lua files
+ rm \
+ experimental_rules/modsecurity_crs_16_scanner_integration.conf \
+ experimental_rules/modsecurity_crs_40_appsensor_detection_point_2.1_request_exception.conf \
+ experimental_rules/modsecurity_crs_41_advanced_filters.conf \
+ experimental_rules/modsecurity_crs_55_response_profiling.conf \
+ experimental_rules/modsecurity_crs_56_pvi_checks.conf \
+ || die
+ else
+ # fix up the path to the scripts; there seems to be no
+ # consistency at all on how the rules are loaded.
+ sed -i \
+ -e "s:/etc/apache2/modsecurity-crs/lua/:${LUADIR}/:" \
+ -e "s:profile_page_scripts.lua:${LUADIR}/\0:" \
+ -e "s:/usr/local/apache/conf/crs/lua/:${LUADIR}/:" \
+ -e "s:/usr/local/apache/conf/modsec_current/base_rules/:${LUADIR}/:" \
+ -e "s:/etc/apache2/modsecurity-crs/lua/:${LUADIR}/:" \
+ -e "s:\.\./lua/:${LUADIR}/:" \
+ *_rules/*.conf || die
+
+ # fix up the shebang on the scripts
+ sed -i -e "s:/opt/local/bin/lua:/usr/bin/lua:" \
+ lua/*.lua || die
+ fi
+
+ sed -i \
+ -e '/SecGeoLookupDb/s:^:#:' \
+ -e '/SecGeoLookupDb/a# Gentoo already defines it in 79_modsecurity.conf' \
+ experimental_rules/modsecurity_crs_61_ip_forensics.conf || die
+
+ if ! use geoip; then
+ if use lua; then
+ # only comment this out as the file is going to be used for other things
+ sed -i -e "/id:'960007'/,+1 s:^:#:" \
+ experimental_rules/modsecurity_crs_61_ip_forensics.conf || die
+ else
+ rm experimental_rules/modsecurity_crs_61_ip_forensics.conf || die
+ fi
+ fi
+}
+
+src_install() {
+ insinto "${RULESDIR}"
+ # slr_rules as of 2.2.6 have broken IDs that don't work with
+ # ModSecurity 2.7, but the rules require 2.7 to begin with.
+ doins -r base_rules optional_rules experimental_rules #slr_rules
+
+ insinto "${LUADIR}"
+ doins lua/*.lua
+
+ dodoc CHANGELOG README.md
+
+ (
+ cat - <<EOF
+<IfDefine SECURITY>
+EOF
+
+ cat modsecurity_crs_10_setup.conf.example
+
+ cat - <<EOF
+
+Include /etc/modsecurity/base_rules/*.conf
+
+# Include Trustwave SpiderLabs Research Team rules
+# Include /etc/modsecurity/slr_rules/*.conf
+# Not installed yet as of 2.2.6
+
+# Optionally use the other rules as well
+# Include /etc/modsecurity/optional_rules/*.conf
+# Include /etc/modsecurity/experimental_rules/*.conf
+</IfDefine>
+
+# -*- apache -*-
+# vim: ts=4 filetype=apache
+
+EOF
+ ) > "${T}"/"80_${PN}.conf"
+
+ insinto /etc/apache2/modules.d/
+ doins "${T}"/"80_${PN}.conf"
+}
+
+pkg_postinst() {
+ elog
+ elog "If you want to enable further rules, check the following directories:"
+ elog " ${RULESDIR}/optional_rules"
+ elog " ${RULESDIR}/experimental_rules"
+ elog ""
+ elog "Starting from version 2.0.9, the default for the Core Rule Set is again to block"
+ elog "when rules hit. If you wish to go back to the 2.0.8 method of anomaly scoring, you"
+ elog "should change 80_${PN}.conf so that you have these settings enabled:"
+ elog ""
+ elog " #SecDefaultAction \"phase:2,deny,log\""
+ elog " SecAction \"phase:1,t:none,nolog,pass,setvar:tx.anomaly_score_blocking=on\""
+ elog ""
+ elog "Starting from version 2.1.2 rules are installed, for consistency, under"
+ elog "/etc/modsecurity, and can be configured with the following file:"
+ elog " /etc/apache2/modules.d/80_${PN}.conf"
+ elog ""
+}
diff --git a/www-apache/mpm_itk/Manifest b/www-apache/mpm_itk/Manifest
new file mode 100644
index 000000000000..3bb4d7ae3159
--- /dev/null
+++ b/www-apache/mpm_itk/Manifest
@@ -0,0 +1 @@
+DIST mpm-itk-2.4.7-02.tar.gz 45450 SHA256 f12656326a1d3b92fefe63446032f0939ed9c803d4d9a1f89bae318eb3432e75 SHA512 d5430662b926821b9c17e1d38d4ade61e9ecf886f53c93de700d835abe6f967cfcdba63e7a4c7e5613043a66ca2356fcea45b572322d09c885fd3af46adb3505 WHIRLPOOL 7fc70f900c5d605059d341d46c5f95662e17eaedb44bce0713d31d39ac618970402b5f6850b806f9d5c807354be72a9e7b27414781f43a1b868634ee629b0a94
diff --git a/www-apache/mpm_itk/files/00_mpm_itk.conf b/www-apache/mpm_itk/files/00_mpm_itk.conf
new file mode 100644
index 000000000000..bb77e57aec6c
--- /dev/null
+++ b/www-apache/mpm_itk/files/00_mpm_itk.conf
@@ -0,0 +1,5 @@
+<IfDefine MPM_ITK>
+ LoadModule mpm_itk_module modules/mpm_itk.so
+ LimitUIDRange 1000 2000
+ LimitGIDRange 1000 2000
+</IfDefine>
diff --git a/www-apache/mpm_itk/metadata.xml b/www-apache/mpm_itk/metadata.xml
new file mode 100644
index 000000000000..f3b97aaa8e99
--- /dev/null
+++ b/www-apache/mpm_itk/metadata.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>mjo@gentoo.org</email>
+ </maintainer>
+</pkgmetadata>
diff --git a/www-apache/mpm_itk/mpm_itk-2.4.7_p2.ebuild b/www-apache/mpm_itk/mpm_itk-2.4.7_p2.ebuild
new file mode 100644
index 000000000000..b54468bc2afb
--- /dev/null
+++ b/www-apache/mpm_itk/mpm_itk-2.4.7_p2.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit apache-module linux-info
+
+MY_PN=${PN/_/-}
+MY_PV=${PV/_p/-0}
+MY_P=${MY_PN}-${MY_PV}
+
+DESCRIPTION="Run virtual hosts under separate users/groups"
+HOMEPAGE="http://mpm-itk.sesse.net/"
+SRC_URI="http://mpm-itk.sesse.net/${MY_P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+S="${WORKDIR}/${MY_P}"
+
+# The libcap dependency is automagic, so we require it
+# unconditionally. Reported upstream at,
+#
+# http://lists.err.no/pipermail/mpm-itk/2014-May/000808.html
+#
+#
+# The -threads USE dependency is only reliable as long as we don't
+# support building more than one MPM. See bug #511658.
+#
+DEPEND="sys-libs/libcap
+ >=www-servers/apache-2.4.7[-threads]"
+RDEPEND="${DEPEND}"
+
+APACHE2_MOD_CONF="00_${PN}"
+APACHE2_MOD_DEFINE="MPM_ITK"
+APXS2_ARGS="-c ${PN}.c seccomp.c -lcap"
+need_apache2_4
+
+pkg_setup() {
+ CONFIG_CHECK="~SECCOMP"
+ linux-info_pkg_setup
+
+ local minkv="3.5"
+ if kernel_is -lt ${minkv//./ }; then
+ ewarn "A kernel newer than ${minkv} (with seccomp v2) is needed"
+ ewarn "for LimitUIDRange and LimitGIDRange which we include by"
+ ewarn "default in ${APACHE2_MOD_CONF}.conf."
+ fi
+}
diff --git a/www-apache/passenger/Manifest b/www-apache/passenger/Manifest
new file mode 100644
index 000000000000..37c2e2320906
--- /dev/null
+++ b/www-apache/passenger/Manifest
@@ -0,0 +1,5 @@
+DIST passenger-4.0.53.tar.gz 4447609 SHA256 0b8d256cd930f93cfe723392aaa12fa3f9d5ddfddc82bbb7ab287673d029e101 SHA512 45919317c42da898783a22095fe75ed26f9142d227a25f5546f16861ce8c3ecfe2d804a845d389a00019df914cafd7625dc4e8fb31bc2f4ede5ecf41ce69c2a7 WHIRLPOOL fd205aefdec95eee82165d5a65e3dcf112544784549aa51d8a52703b51242120583e64837604ba31957e2cc98fb85a164f9ee19c367980869e0ff0159759c492
+DIST passenger-4.0.59.tar.gz 4521206 SHA256 8b4756564a5133dc97425883d15d1ba1c9f6566c79e92794dc3e1f5b749238ae SHA512 d29400c71cf9530b41ce8b8d4cf94007e4d77fb4ceff290786506d6b9dfbab790f18423dc5dcd71aef07147ba2610c2982f7ca733a8e491de6a0cb3704c54bfb WHIRLPOOL 4683d19813ecbb284ec3eb9681c6c1a1b84f256f0262e6c2b1941df5872031a30da1396cb22fa1cfbad2f53f8971131ed0418c2ef4c20160a3d67f151d54208a
+DIST passenger-5.0.13.tar.gz 5556161 SHA256 9fef27b97e883e6bc55d817c52b927f2d5cd8bbc2ce79686a3de794d7e0c40e1 SHA512 68ff1e6701e431b1e26ffce8dd46198fffdddaa14bfa2f3917a20d32a7d54b3acac46d1ce797b551d9f988e7e0129d8372158f2e096342e08cb1a614d9fbf716 WHIRLPOOL 85282b61b675a0459a33208dd267d9e3b2284134bd5931df619041b5e4a2265542f9355e7f1feae2c98ffc27128504ecd46dc6493e8cbb8d55e7f9dfbf5deeac
+DIST passenger-5.0.14.tar.gz 5557110 SHA256 dbc994a9d8a0f28f2abeec25191471bbfec6e51d3e0748d7e16947bc8713f6d5 SHA512 39540136547db1b21c61174a4e86a4b5255c1f59036abbfc571eaee6fb03c48d4ec262d7fb1f1a27bf08b093112d8aaeb09c294304b597d0fdcd1fc278167b79 WHIRLPOOL 8cc983685142abbde9e85b12ee7283246fa7ebd627d56516328d6fc2ad5362439da9fcab37fffc129c2b4e992834c5efd09cfa9ee570d2c577dfd27ec8c56f95
+DIST passenger-5.0.4.tar.gz 5289792 SHA256 5c29f2c1407db515ddccd540443cb34bff7ca180b3e269c2e28a34ad795f99f6 SHA512 a04bcf579a8148b34c34743a87f4f3b180218e871ed6309d7b83e9b4ab88334f01a566896c7406e3ddaf11ba0322128557cf5cfb2bcf5da7e4ea81f0539784ec WHIRLPOOL f2d523266a616d2b893963d5139be0d781a2bf76b122b4c76bb5cb6af7a655e5492b8c58d2f38f97858616108d0c3122278598fcfa7a262bab252e079e888536
diff --git a/www-apache/passenger/files/2.2.15-gentoo-multilib-strict.patch b/www-apache/passenger/files/2.2.15-gentoo-multilib-strict.patch
new file mode 100644
index 000000000000..ff6cefc7dfdd
--- /dev/null
+++ b/www-apache/passenger/files/2.2.15-gentoo-multilib-strict.patch
@@ -0,0 +1,33 @@
+diff -Nuar passenger-2.2.15.orig/Rakefile passenger-2.2.15/Rakefile
+--- passenger-2.2.15.orig/Rakefile 2010-11-05 03:19:02.000000000 +0000
++++ passenger-2.2.15/Rakefile 2010-11-05 03:23:45.000000000 +0000
+@@ -744,7 +744,7 @@
+ extdir = "#{libdir}/#{CONFIG['arch']}"
+ bindir = "#{fakeroot}/usr/bin"
+ docdir = "#{fakeroot}/usr/share/doc/passenger-#{PACKAGE_VERSION}"
+- libexecdir = "#{fakeroot}/usr/lib/phusion_passenger"
++ libexecdir = "#{fakeroot}/usr/libexec/phusion_passenger"
+
+ sh "rm -rf #{fakeroot}"
+ sh "mkdir -p #{fakeroot}"
+diff -Nuar passenger-2.2.15.orig/ext/common/Utils.cpp passenger-2.2.15/ext/common/Utils.cpp
+--- passenger-2.2.15.orig/ext/common/Utils.cpp 2010-06-24 11:53:02.000000000 +0000
++++ passenger-2.2.15/ext/common/Utils.cpp 2010-11-05 03:22:39.000000000 +0000
+@@ -113,7 +113,7 @@
+ return path;
+ } else {
+ path.assign(root);
+- path.append("lib/phusion_passenger/passenger-spawn-server");
++ path.append("libexec/phusion_passenger/passenger-spawn-server");
+ return path;
+ }
+ return path;
+@@ -152,7 +152,7 @@
+ return path;
+ } else {
+ path.assign(root);
+- path.append("lib/phusion_passenger/ApplicationPoolServerExecutable");
++ path.append("libexec/phusion_passenger/ApplicationPoolServerExecutable");
+ return path;
+ }
+ }
diff --git a/www-apache/passenger/files/2.2.4-gentoo.patch b/www-apache/passenger/files/2.2.4-gentoo.patch
new file mode 100644
index 000000000000..cd51913b9099
--- /dev/null
+++ b/www-apache/passenger/files/2.2.4-gentoo.patch
@@ -0,0 +1,42 @@
+--- Rakefile.~1~ 2009-05-19 11:48:28.236986307 +0200
++++ Rakefile 2009-05-19 11:50:53.000000000 +0200
+@@ -38,11 +38,7 @@
+
+ CXX = "g++"
+ LIBEXT = PlatformInfo.library_extension
+-if OPTIMIZE
+- OPTIMIZATION_FLAGS = "#{PlatformInfo.debugging_cflags} -O2 -DBOOST_DISABLE_ASSERTS"
+-else
+- OPTIMIZATION_FLAGS = "#{PlatformInfo.debugging_cflags} -DPASSENGER_DEBUG -DBOOST_DISABLE_ASSERTS"
+-end
++OPTIMIZATION_FLAGS = "#{ENV['CXXFLAGS']} -DNDEBUG"
+
+ # Extra compiler flags that should always be passed to the C/C++ compiler.
+ # Should be included last in the command string.
+@@ -733,15 +729,15 @@
+ task :fakeroot => [:apache2, :native_support, :doc] do
+ require 'rbconfig'
+ include Config
+- fakeroot = "pkg/fakeroot"
++ fakeroot = ENV['DISTDIR']
+
+ # We don't use CONFIG['archdir'] and the like because we want
+ # the files to be installed to /usr, and the Ruby interpreter
+ # on the packaging machine might be in /usr/local.
+- libdir = "#{fakeroot}/usr/lib/ruby/#{CONFIG['ruby_version']}"
++ libdir = "#{fakeroot}/#{CONFIG['sitedir']}/#{CONFIG['ruby_version']}"
+ extdir = "#{libdir}/#{CONFIG['arch']}"
+ bindir = "#{fakeroot}/usr/bin"
+- docdir = "#{fakeroot}/usr/share/doc/phusion_passenger"
++ docdir = "#{fakeroot}/usr/share/doc/passenger-#{PACKAGE_VERSION}"
+ libexecdir = "#{fakeroot}/usr/lib/phusion_passenger"
+
+ sh "rm -rf #{fakeroot}"
+@@ -757,7 +753,6 @@
+ sh "cp bin/* #{bindir}/"
+
+ sh "mkdir -p #{libexecdir}"
+- sh "cp ext/apache2/mod_passenger.so #{libexecdir}/"
+ sh "mv #{fakeroot}/usr/bin/passenger-spawn-server #{libexecdir}/"
+ sh "cp ext/apache2/ApplicationPoolServerExecutable #{libexecdir}/"
+
diff --git a/www-apache/passenger/files/30_mod_passenger-2.0.1.conf b/www-apache/passenger/files/30_mod_passenger-2.0.1.conf
new file mode 100644
index 000000000000..0bd79143309e
--- /dev/null
+++ b/www-apache/passenger/files/30_mod_passenger-2.0.1.conf
@@ -0,0 +1,63 @@
+<IfDefine PASSENGER>
+LoadModule passenger_module modules/mod_passenger.so
+
+# The location to the Phusion Passenger root directory. This configuration
+# option is essential to Phusion Passenger. The correct value is given by the
+# installer, and should usually not be changed manually.
+PassengerRoot /usr
+
+# This option allows one to specify how much information Phusion Passenger
+# should write to the Apache error log file. A higher log level value means
+# that more information will be logged.
+#
+# Possible values are:
+#
+# 0: Show only errors and warnings.
+# 1: Show the most important debugging information. This might be useful for
+# system administrators who are trying to figure out the cause of a
+# problem.
+# 2: Show more debugging information. This is typically only useful for
+# developers.
+# 3: Show even more debugging information.
+PassengerLogLevel 0
+
+# This option allows one to specify the Ruby interpreter to use.
+PassengerRuby /usr/bin/ruby
+
+# Whether Passenger should automatically detect whether a virtual host's
+# document root is a Ruby on Rails application.
+RailsAutoDetect On
+
+# The maximum number of Ruby on Rails application instances that may be
+# simultaneously active. A larger number results in higher memory usage, but
+# improved ability to handle concurrent HTTP clients.
+PassengerMaxPoolSize 20
+
+# The maximum number of seconds that a Ruby on Rails application instance may
+# be idle. That is, if an application instance hasn't done anything after the
+# given number of seconds, then it will be shutdown in order to conserve
+# memory.
+PassengerPoolIdleTime 120
+
+# The maximum number of application instances that may be simultaneously active
+# for a single application. This helps to make sure that a single application
+# will not occupy all available slots in the application pool.
+#
+# This value must be less than PassengerMaxPoolSize. A value of 0 means that
+# there is no limit placed on the number of instances a single application may
+# use, i.e. only the global limit of PassengerMaxPoolSize will be enforced.
+PassengerMaxInstancesPerApp 0
+
+# When the PassengerUserSwitching option is enabled a Rails application is started
+# as the owner of the file config/environment.rb. So if
+# /home/webapps/foo/config/environment.rb is owned by joe, then Passenger will
+# launch the corresponding Rails application as joe as well.
+PassengerUserSwitching On
+
+# Under no circumstances will Rails applications be run as root. If
+# environment.rb is owned by root or by an unknown user, then the Rails
+# application will run as the user specified by PassengerDefaultUser.
+PassengerDefaultUser apache
+</IfDefine>
+
+# vim: ts=4 filetype=apache
diff --git a/www-apache/passenger/files/30_mod_passenger-4.0.0.conf b/www-apache/passenger/files/30_mod_passenger-4.0.0.conf
new file mode 100644
index 000000000000..f218b59ca412
--- /dev/null
+++ b/www-apache/passenger/files/30_mod_passenger-4.0.0.conf
@@ -0,0 +1,63 @@
+<IfDefine PASSENGER>
+LoadModule passenger_module modules/mod_passenger.so
+
+# The location to the Phusion Passenger root directory. This configuration
+# option is essential to Phusion Passenger. The correct value is given by the
+# installer, and should usually not be changed manually.
+PassengerRoot /usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini
+
+# This option allows one to specify how much information Phusion Passenger
+# should write to the Apache error log file. A higher log level value means
+# that more information will be logged.
+#
+# Possible values are:
+#
+# 0: Show only errors and warnings.
+# 1: Show the most important debugging information. This might be useful for
+# system administrators who are trying to figure out the cause of a
+# problem.
+# 2: Show more debugging information. This is typically only useful for
+# developers.
+# 3: Show even more debugging information.
+PassengerLogLevel 0
+
+# This option specifies the default global version of Ruby to use.
+PassengerDefaultRuby /usr/bin/ruby
+
+# This option allows one to specify the Ruby interpreter to use for
+# specific instances.
+# PassengerRuby /usr/bin/ruby
+
+# The maximum number of Ruby on Rails application instances that may be
+# simultaneously active. A larger number results in higher memory usage, but
+# improved ability to handle concurrent HTTP clients.
+PassengerMaxPoolSize 20
+
+# The maximum number of seconds that a Ruby on Rails application instance may
+# be idle. That is, if an application instance hasn't done anything after the
+# given number of seconds, then it will be shutdown in order to conserve
+# memory.
+PassengerPoolIdleTime 120
+
+# The maximum number of application instances that may be simultaneously active
+# for a single application. This helps to make sure that a single application
+# will not occupy all available slots in the application pool.
+#
+# This value must be less than PassengerMaxPoolSize. A value of 0 means that
+# there is no limit placed on the number of instances a single application may
+# use, i.e. only the global limit of PassengerMaxPoolSize will be enforced.
+PassengerMaxInstancesPerApp 0
+
+# When the PassengerUserSwitching option is enabled a Rails application is started
+# as the owner of the file config/environment.rb. So if
+# /home/webapps/foo/config/environment.rb is owned by joe, then Passenger will
+# launch the corresponding Rails application as joe as well.
+PassengerUserSwitching On
+
+# Under no circumstances will Rails applications be run as root. If
+# environment.rb is owned by root or by an unknown user, then the Rails
+# application will run as the user specified by PassengerDefaultUser.
+PassengerDefaultUser apache
+</IfDefine>
+
+# vim: ts=4 filetype=apache
diff --git a/www-apache/passenger/files/30_mod_passenger-5.0.0.conf b/www-apache/passenger/files/30_mod_passenger-5.0.0.conf
new file mode 100644
index 000000000000..f218b59ca412
--- /dev/null
+++ b/www-apache/passenger/files/30_mod_passenger-5.0.0.conf
@@ -0,0 +1,63 @@
+<IfDefine PASSENGER>
+LoadModule passenger_module modules/mod_passenger.so
+
+# The location to the Phusion Passenger root directory. This configuration
+# option is essential to Phusion Passenger. The correct value is given by the
+# installer, and should usually not be changed manually.
+PassengerRoot /usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini
+
+# This option allows one to specify how much information Phusion Passenger
+# should write to the Apache error log file. A higher log level value means
+# that more information will be logged.
+#
+# Possible values are:
+#
+# 0: Show only errors and warnings.
+# 1: Show the most important debugging information. This might be useful for
+# system administrators who are trying to figure out the cause of a
+# problem.
+# 2: Show more debugging information. This is typically only useful for
+# developers.
+# 3: Show even more debugging information.
+PassengerLogLevel 0
+
+# This option specifies the default global version of Ruby to use.
+PassengerDefaultRuby /usr/bin/ruby
+
+# This option allows one to specify the Ruby interpreter to use for
+# specific instances.
+# PassengerRuby /usr/bin/ruby
+
+# The maximum number of Ruby on Rails application instances that may be
+# simultaneously active. A larger number results in higher memory usage, but
+# improved ability to handle concurrent HTTP clients.
+PassengerMaxPoolSize 20
+
+# The maximum number of seconds that a Ruby on Rails application instance may
+# be idle. That is, if an application instance hasn't done anything after the
+# given number of seconds, then it will be shutdown in order to conserve
+# memory.
+PassengerPoolIdleTime 120
+
+# The maximum number of application instances that may be simultaneously active
+# for a single application. This helps to make sure that a single application
+# will not occupy all available slots in the application pool.
+#
+# This value must be less than PassengerMaxPoolSize. A value of 0 means that
+# there is no limit placed on the number of instances a single application may
+# use, i.e. only the global limit of PassengerMaxPoolSize will be enforced.
+PassengerMaxInstancesPerApp 0
+
+# When the PassengerUserSwitching option is enabled a Rails application is started
+# as the owner of the file config/environment.rb. So if
+# /home/webapps/foo/config/environment.rb is owned by joe, then Passenger will
+# launch the corresponding Rails application as joe as well.
+PassengerUserSwitching On
+
+# Under no circumstances will Rails applications be run as root. If
+# environment.rb is owned by root or by an unknown user, then the Rails
+# application will run as the user specified by PassengerDefaultUser.
+PassengerDefaultUser apache
+</IfDefine>
+
+# vim: ts=4 filetype=apache
diff --git a/www-apache/passenger/files/passenger-3.0.0-gentoo.patch b/www-apache/passenger/files/passenger-3.0.0-gentoo.patch
new file mode 100644
index 000000000000..695b9d542e98
--- /dev/null
+++ b/www-apache/passenger/files/passenger-3.0.0-gentoo.patch
@@ -0,0 +1,34 @@
+--- build/config.rb.~1~ 2010-10-01 12:22:34.000000000 +0200
++++ build/config.rb 2010-11-02 10:56:25.309314070 +0100
+@@ -17,11 +17,7 @@
+ OPTIMIZE = boolean_option("OPTIMIZE")
+ CC = string_option("CC", "gcc")
+ CXX = string_option("CXX", "g++")
+-if OPTIMIZE
+- OPTIMIZATION_FLAGS = "#{PlatformInfo.debugging_cflags} -O2 -DBOOST_DISABLE_ASSERTS".strip
+-else
+- OPTIMIZATION_FLAGS = "#{PlatformInfo.debugging_cflags} -DPASSENGER_DEBUG -DBOOST_DISABLE_ASSERTS".strip
+-end
++OPTIMIZATION_FLAGS = "#{ENV['CXXFLAGS']}"
+
+ # Extra compiler flags that should always be passed to the C/C++ compiler.
+ # Should be included last in the command string, even after PlatformInfo.portability_cflags.
+--- build/packaging.rb.~1~ 2010-10-10 20:52:03.000000000 +0200
++++ build/packaging.rb 2010-11-02 11:03:56.944938507 +0100
+@@ -87,13 +87,13 @@
+ require 'rbconfig'
+ require 'fileutils'
+ include Config
+- fakeroot = "pkg/fakeroot"
++ fakeroot = ENV['DISTDIR']
+
+ # We don't use CONFIG['archdir'] and the like because we want
+ # the files to be installed to /usr, and the Ruby interpreter
+ # on the packaging machine might be in /usr/local.
+- fake_libdir = "#{fakeroot}/usr/lib/ruby/#{CONFIG['ruby_version']}"
+- fake_native_support_dir = "#{fakeroot}/usr/lib/ruby/#{CONFIG['ruby_version']}/#{CONFIG['arch']}"
++ fake_libdir = "#{fakeroot}/#{CONFIG['sitedir']}/#{CONFIG['ruby_version']}"
++ fake_native_support_dir = "#{fakeroot}/#{CONFIG['sitedir']}/#{CONFIG['ruby_version']}/#{CONFIG['arch']}"
+ fake_agents_dir = "#{fakeroot}#{NATIVELY_PACKAGED_AGENTS_DIR}"
+ fake_helper_scripts_dir = "#{fakeroot}#{NATIVELY_PACKAGED_HELPER_SCRIPTS_DIR}"
+ fake_docdir = "#{fakeroot}#{NATIVELY_PACKAGED_DOCDIR}"
diff --git a/www-apache/passenger/files/passenger-3.0.0-ldflags.patch b/www-apache/passenger/files/passenger-3.0.0-ldflags.patch
new file mode 100644
index 000000000000..dd378addf7a5
--- /dev/null
+++ b/www-apache/passenger/files/passenger-3.0.0-ldflags.patch
@@ -0,0 +1,13 @@
+--- build/config.rb.~1~ 2010-11-07 11:46:22.257690348 +0100
++++ build/config.rb 2010-11-07 12:41:40.601438803 +0100
+@@ -25,7 +25,7 @@
+
+ # Extra linker flags that should always be passed to the linker.
+ # Should be included last in the command string, even after PlatformInfo.portability_ldflags.
+-EXTRA_LDFLAGS = ""
++EXTRA_LDFLAGS = "#{ENV['LDFLAGS']}"
+
+ # Whether to use the vendored libev or the system one.
+-USE_VENDORED_LIBEV = boolean_option("USE_VENDORED_LIBEV", true)
+\ No newline at end of file
++USE_VENDORED_LIBEV = boolean_option("USE_VENDORED_LIBEV", true)
diff --git a/www-apache/passenger/files/passenger-3.0.12-ldflags.patch b/www-apache/passenger/files/passenger-3.0.12-ldflags.patch
new file mode 100644
index 000000000000..de724eff30a8
--- /dev/null
+++ b/www-apache/passenger/files/passenger-3.0.12-ldflags.patch
@@ -0,0 +1,10 @@
+--- build/config.rb.~1~ 2010-11-07 11:46:22.257690348 +0100
++++ build/config.rb 2010-11-07 12:41:40.601438803 +0100
+@@ -25,6 +25,6 @@
+
+ # Extra linker flags that should always be passed to the linker.
+ # Should be included last in the command string, even after PlatformInfo.portability_ldflags.
+-EXTRA_LDFLAGS = ""
++EXTRA_LDFLAGS = "#{ENV['LDFLAGS']}"
+
+ # Whether to use the vendored libev or the system one.
diff --git a/www-apache/passenger/files/passenger-3.0.21-temp-file-usage.patch b/www-apache/passenger/files/passenger-3.0.21-temp-file-usage.patch
new file mode 100644
index 000000000000..54f227f78c6b
--- /dev/null
+++ b/www-apache/passenger/files/passenger-3.0.21-temp-file-usage.patch
@@ -0,0 +1,140 @@
+--- passenger-release-3.0.21.orig/ext/common/LoggingAgent/Main.cpp 2013-05-29 07:09:31.000000000 -0500
++++ passenger-release-3.0.21.orig/ext/common/LoggingAgent/Main.cpp 2013-07-18 09:35:47.514433743 -0500
+@@ -265,11 +265,6 @@ main(int argc, char *argv[]) {
+ ev::sig sigtermWatcher(eventLoop);
+ ev::sig sigquitWatcher(eventLoop);
+
+- if (feedbackFdAvailable()) {
+- feedbackFdWatcher.set<&feedbackFdBecameReadable>();
+- feedbackFdWatcher.start(FEEDBACK_FD, ev::READ);
+- writeArrayMessage(FEEDBACK_FD, "initialized", NULL);
+- }
+ sigintWatcher.set<&caughtExitSignal>();
+ sigintWatcher.start(SIGINT);
+ sigtermWatcher.set<&caughtExitSignal>();
+@@ -281,6 +276,11 @@ main(int argc, char *argv[]) {
+ /********** Initialized! Enter main loop... **********/
+
+ P_DEBUG("Logging agent online, listening at " << socketAddress);
++ if (feedbackFdAvailable()) {
++ feedbackFdWatcher.set<&feedbackFdBecameReadable>();
++ feedbackFdWatcher.start(FEEDBACK_FD, ev::READ);
++ writeArrayMessage(FEEDBACK_FD, "initialized", NULL);
++ }
+ ev_loop(eventLoop, 0);
+ return exitCode;
+ } catch (const tracable_exception &e) {
+--- passenger-release-3.0.21.orig/ext/common/ServerInstanceDir.h 2013-05-29 07:09:31.000000000 -0500
++++ passenger-release-3.0.21.orig/ext/common/ServerInstanceDir.h 2013-07-18 09:38:54.431808622 -0500
+@@ -30,6 +30,7 @@
+ #include <oxt/backtrace.hpp>
+
+ #include <sys/types.h>
++#include <sys/stat.h>
+ #include <dirent.h>
+ #include <unistd.h>
+ #include <pwd.h>
+@@ -38,6 +39,7 @@
+ #include <cstring>
+ #include <string>
+
++#include <Logging.h>
+ #include "Exceptions.h"
+ #include "Utils.h"
+ #include "Utils/StrIntUtils.h"
+@@ -217,7 +219,69 @@ private:
+ * rights though, because we want admin tools to be able to list the available
+ * generations no matter what user they're running as.
+ */
+- makeDirTree(path, "u=rwxs,g=rx,o=rx");
++ if (owner) {
++ switch (getFileType(path)) {
++ case FT_NONEXISTANT:
++ createDirectory(path);
++ break;
++ case FT_DIRECTORY:
++ verifyDirectoryPermissions(path);
++ break;
++ default:
++ throw RuntimeException("'" + path + "' already exists, and is not a directory");
++ }
++ } else if (getFileType(path) != FT_DIRECTORY) {
++ throw RuntimeException("Server instance directory '" + path +
++ "' does not exist");
++ }
++ }
++
++ void createDirectory(const string &path) const {
++ // We do not use makeDirTree() here. If an attacker creates a directory
++ // just before we do, then we want to abort because we want the directory
++ // to have specific permissions.
++ if (mkdir(path.c_str(), parseModeString("u=rwx,g=rx,o=rx")) == -1) {
++ int e = errno;
++ throw FileSystemException("Cannot create server instance directory '" +
++ path + "'", e, path);
++ }
++ // verifyDirectoryPermissions() checks for the owner/group so we must make
++ // sure the server instance directory has that owner/group, even when the
++ // parent directory has setgid on.
++ if (chown(path.c_str(), geteuid(), getegid()) == -1) {
++ int e = errno;
++ throw FileSystemException("Cannot change the permissions of the server "
++ "instance directory '" + path + "'", e, path);
++ }
++ }
++
++ /**
++ * When reusing an existing server instance directory, check permissions
++ * so that an attacker cannot pre-create a directory with too liberal
++ * permissions.
++ */
++ void verifyDirectoryPermissions(const string &path) {
++ TRACE_POINT();
++ struct stat buf;
++
++ if (stat(path.c_str(), &buf) == -1) {
++ int e = errno;
++ throw FileSystemException("Cannot stat() " + path, e, path);
++ } else if (buf.st_mode != (S_IFDIR | parseModeString("u=rwx,g=rx,o=rx"))) {
++ throw RuntimeException("Tried to reuse existing server instance directory " +
++ path + ", but it has wrong permissions");
++ } else if (buf.st_uid != geteuid() || buf.st_gid != getegid()) {
++ /* The server instance directory is always created by the Watchdog. Its UID/GID never
++ * changes because:
++ * 1. Disabling user switching only lowers the privilege of the HelperAgent.
++ * 2. For the UID/GID to change, the web server must be completely restarted
++ * (not just graceful reload) so that the control process can change its UID/GID.
++ * This causes the PID to change, so that an entirely new server instance
++ * directory is created.
++ */
++ throw RuntimeException("Tried to reuse existing server instance directory " +
++ path + ", but it has wrong owner and group");
++ }
+ }
+
+ bool isDirectory(const string &dir, struct dirent *entry) const {
+--- passenger-release-3.0.21.orig/NEWS 2013-05-29 07:09:31.000000000 -0500
++++ passenger-release-3.0.21.orig/NEWS 2013-07-18 08:58:30.943558375 -0500
+@@ -8,6 +8,7 @@ Release 3.0.21
+ * Catch exceptions raised by Rack application objects.
+ * Fix for CVE-2013-2119. Details can be found in the announcement for version 4.0.5.
+ * Version 3.0.20 was pulled because its fixes were incomplete.
++ * Fix for CVE-2013-4136. Details can be found in the announcement for version 4.0.8.
+
+
+ Release 3.0.19
+--- passenger-release-3.0.21.orig/test/cxx/ServerInstanceDirTest.cpp 2013-05-29 07:09:31.000000000 -0500
++++ passenger-release-3.0.21.orig/test/cxx/ServerInstanceDirTest.cpp 2013-07-18 09:09:50.898433782 -0500
+@@ -73,9 +73,11 @@ namespace tut {
+ }
+
+ TEST_METHOD(5) {
+- // The destructor doesnn't remove the server instance directory if it
++ // The destructor doesn't remove the server instance directory if it
+ // wasn't created with the ownership flag or if it's been detached.
+ string path, path2;
++ makeDirTree(parentDir + "/passenger-test.1234");
++ makeDirTree(parentDir + "/passenger-test.5678");
+ {
+ ServerInstanceDir dir(1234, parentDir, false);
+ ServerInstanceDir dir2(5678, parentDir);
diff --git a/www-apache/passenger/files/passenger-3.0.8-gentoo.patch b/www-apache/passenger/files/passenger-3.0.8-gentoo.patch
new file mode 100644
index 000000000000..6ca33dd32812
--- /dev/null
+++ b/www-apache/passenger/files/passenger-3.0.8-gentoo.patch
@@ -0,0 +1,35 @@
+--- build/config.rb.~1~ 2010-10-01 12:22:34.000000000 +0200
++++ build/config.rb 2010-11-02 10:56:25.309314070 +0100
+@@ -17,12 +17,8 @@
+ OPTIMIZE = boolean_option("OPTIMIZE")
+ CC = string_option("CC", "gcc")
+ CXX = string_option("CXX", "g++")
+ # TODO: consider -fcommon
+-if OPTIMIZE
+- OPTIMIZATION_FLAGS = "#{PlatformInfo.debugging_cflags} -O2 -DBOOST_DISABLE_ASSERTS".strip
+-else
+- OPTIMIZATION_FLAGS = "#{PlatformInfo.debugging_cflags} -DPASSENGER_DEBUG -DBOOST_DISABLE_ASSERTS".strip
+-end
++OPTIMIZATION_FLAGS = "#{ENV['CXXFLAGS']} -DBOOST_DISABLE_ASSERTS".strip
+
+ # Extra compiler flags that should always be passed to the C/C++ compiler.
+ # Should be included last in the command string, even after PlatformInfo.portability_cflags.
+--- build/packaging.rb.~1~ 2010-10-10 20:52:03.000000000 +0200
++++ build/packaging.rb 2010-11-02 11:03:56.944938507 +0100
+@@ -87,13 +87,13 @@
+ require 'rbconfig'
+ require 'fileutils'
+ include Config
+- fakeroot = "pkg/fakeroot"
++ fakeroot = ENV['DISTDIR']
+
+ # We don't use CONFIG['archdir'] and the like because we want
+ # the files to be installed to /usr, and the Ruby interpreter
+ # on the packaging machine might be in /usr/local.
+- fake_libdir = "#{fakeroot}/usr/lib/ruby/#{CONFIG['ruby_version']}"
+- fake_native_support_dir = "#{fakeroot}/usr/lib/ruby/#{CONFIG['ruby_version']}/#{CONFIG['arch']}"
++ fake_libdir = "#{fakeroot}/#{CONFIG['sitedir']}/#{CONFIG['ruby_version']}"
++ fake_native_support_dir = "#{fakeroot}/#{CONFIG['sitedir']}/#{CONFIG['ruby_version']}/#{CONFIG['arch']}"
+ fake_agents_dir = "#{fakeroot}#{NATIVELY_PACKAGED_AGENTS_DIR}"
+ fake_helper_scripts_dir = "#{fakeroot}#{NATIVELY_PACKAGED_HELPER_SCRIPTS_DIR}"
+ fake_docdir = "#{fakeroot}#{NATIVELY_PACKAGED_DOCDIR}"
diff --git a/www-apache/passenger/files/passenger-4.0.10-gentoo.patch b/www-apache/passenger/files/passenger-4.0.10-gentoo.patch
new file mode 100644
index 000000000000..808f988c7a72
--- /dev/null
+++ b/www-apache/passenger/files/passenger-4.0.10-gentoo.patch
@@ -0,0 +1,48 @@
+--- build/packaging.rb.~1~ 2013-07-09 10:10:02.000000000 +0200
++++ build/packaging.rb 2013-07-17 10:25:33.287663252 +0200
+@@ -184,7 +184,7 @@
+ require 'rbconfig'
+ require 'fileutils'
+ include RbConfig
+- fakeroot = "pkg/fakeroot"
++ fakeroot = ENV['DISTDIR']
+
+ # We don't use CONFIG['archdir'] and the like because we want
+ # the files to be installed to /usr, and the Ruby interpreter
+--- build/packaging.rb.~1~ 2013-07-17 13:06:40.199882060 +0200
++++ build/packaging.rb 2013-07-17 13:18:31.444209611 +0200
+@@ -189,9 +189,9 @@
+ # We don't use CONFIG['archdir'] and the like because we want
+ # the files to be installed to /usr, and the Ruby interpreter
+ # on the packaging machine might be in /usr/local.
+- fake_rubylibdir = "#{fakeroot}/usr/lib/ruby/vendor_ruby"
++ fake_rubylibdir = "#{fakeroot}#{CONFIG['vendordir']}"
+ fake_libdir = "#{fakeroot}/usr/lib/passenger"
+- fake_native_support_dir = "#{fakeroot}/usr/lib/ruby/#{CONFIG['ruby_version']}/#{CONFIG['arch']}"
++ fake_native_support_dir = "#{fakeroot}#{CONFIG['archdir']}"
+ fake_agents_dir = "#{fakeroot}/usr/lib/#{GLOBAL_NAMESPACE_DIRNAME}/agents"
+ fake_helper_scripts_dir = "#{fakeroot}/usr/share/#{GLOBAL_NAMESPACE_DIRNAME}/helper-scripts"
+ fake_resources_dir = "#{fakeroot}/usr/share/passenger"
+--- build/packaging.rb.~1~ 2013-07-17 13:19:21.434826846 +0200
++++ build/packaging.rb 2013-07-17 13:21:42.954912287 +0200
+@@ -276,10 +276,6 @@
+ sh "cp bin/#{exe} #{fake_sbindir}/"
+ end
+
+- # Apache 2 module
+- sh "mkdir -p #{fake_apache2_module_dir}"
+- sh "cp #{APACHE2_MODULE} #{fake_apache2_module_dir}/"
+-
+ # Ruby extension sources
+ sh "mkdir -p #{fake_ruby_extension_source_dir}"
+ sh "cp -R #{PhusionPassenger.ruby_extension_source_dir}/* #{fake_ruby_extension_source_dir}"
+--- build/packaging.rb.~1~ 2013-07-17 13:25:51.440038844 +0200
++++ build/packaging.rb 2013-07-17 13:33:30.151365870 +0200
+@@ -203,7 +203,6 @@
+ fake_apache2_module = "#{fake_apache2_module_dir}/mod_passenger.so"
+ fake_ruby_extension_source_dir = "#{fakeroot}/usr/share/passenger/ruby_extension_source"
+
+- sh "rm -rf #{fakeroot}"
+ sh "mkdir -p #{fakeroot}"
+
+ # Ruby sources
diff --git a/www-apache/passenger/files/passenger-4.0.18-gentoo.patch b/www-apache/passenger/files/passenger-4.0.18-gentoo.patch
new file mode 100644
index 000000000000..7eb7c3392062
--- /dev/null
+++ b/www-apache/passenger/files/passenger-4.0.18-gentoo.patch
@@ -0,0 +1,39 @@
+--- build/packaging.rb.~1~ 2013-09-14 10:09:56.000000000 +0200
++++ build/packaging.rb 2013-10-05 15:03:51.474846961 +0200
+@@ -306,14 +306,14 @@
+ require 'rbconfig'
+ require 'fileutils'
+ include RbConfig
+- fakeroot = "pkg/fakeroot"
++ fakeroot = ENV['DISTDIR']
+
+ # We don't use CONFIG['archdir'] and the like because we want
+ # the files to be installed to /usr, and the Ruby interpreter
+ # on the packaging machine might be in /usr/local.
+- fake_rubylibdir = "#{fakeroot}/usr/lib/ruby/vendor_ruby"
++ fake_rubylibdir = "#{fakeroot}#{CONFIG['vendordir']}"
+ fake_libdir = "#{fakeroot}/usr/lib/#{GLOBAL_NAMESPACE_DIRNAME}"
+- fake_native_support_dir = "#{fakeroot}/usr/lib/ruby/#{CONFIG['ruby_version']}/#{CONFIG['arch']}"
++ fake_native_support_dir = "#{fakeroot}#{CONFIG['archdir']}"
+ fake_agents_dir = "#{fakeroot}/usr/lib/#{GLOBAL_NAMESPACE_DIRNAME}/agents"
+ fake_helper_scripts_dir = "#{fakeroot}/usr/share/#{GLOBAL_NAMESPACE_DIRNAME}/helper-scripts"
+ fake_resources_dir = "#{fakeroot}/usr/share/#{GLOBAL_NAMESPACE_DIRNAME}"
+@@ -326,7 +326,6 @@
+ fake_ruby_extension_source_dir = "#{fakeroot}/usr/share/#{GLOBAL_NAMESPACE_DIRNAME}/ruby_extension_source"
+ fake_nginx_module_source_dir = "#{fakeroot}/usr/share/#{GLOBAL_NAMESPACE_DIRNAME}/ngx_http_passenger_module"
+
+- sh "rm -rf #{fakeroot}"
+ sh "mkdir -p #{fakeroot}"
+
+ # Ruby sources
+@@ -405,10 +404,6 @@
+ end
+ end
+
+- # Apache 2 module
+- sh "mkdir -p #{fake_apache2_module_dir}"
+- sh "cp #{APACHE2_MODULE} #{fake_apache2_module_dir}/"
+-
+ # Ruby extension sources
+ sh "mkdir -p #{fake_ruby_extension_source_dir}"
+ sh "cp -R #{PhusionPassenger.ruby_extension_source_dir}/* #{fake_ruby_extension_source_dir}"
diff --git a/www-apache/passenger/files/passenger-4.0.21-gentoo.patch b/www-apache/passenger/files/passenger-4.0.21-gentoo.patch
new file mode 100644
index 000000000000..30c6ea1b15cd
--- /dev/null
+++ b/www-apache/passenger/files/passenger-4.0.21-gentoo.patch
@@ -0,0 +1,40 @@
+--- build/packaging.rb.~1~ 2013-09-14 10:09:56.000000000 +0200
++++ build/packaging.rb 2013-10-05 15:03:51.474846961 +0200
+@@ -306,15 +306,15 @@
+ require 'rbconfig'
+ require 'fileutils'
+ include RbConfig
+- fakeroot = "pkg/fakeroot"
++ fakeroot = ENV['DISTDIR']
+
+ # We don't use CONFIG['archdir'] and the like because we want
+ # the files to be installed to /usr, and the Ruby interpreter
+ # on the packaging machine might be in /usr/local.
+- fake_rubylibdir = "#{fakeroot}/usr/lib/ruby/vendor_ruby"
++ fake_rubylibdir = "#{fakeroot}#{CONFIG['vendordir']}"
+ fake_nodelibdir = "#{fakeroot}/usr/share/#{GLOBAL_NAMESPACE_DIRNAME}/node"
+ fake_libdir = "#{fakeroot}/usr/lib/#{GLOBAL_NAMESPACE_DIRNAME}"
+- fake_native_support_dir = "#{fakeroot}/usr/lib/ruby/#{CONFIG['ruby_version']}/#{CONFIG['arch']}"
++ fake_native_support_dir = "#{fakeroot}#{CONFIG['archdir']}"
+ fake_agents_dir = "#{fakeroot}/usr/lib/#{GLOBAL_NAMESPACE_DIRNAME}/agents"
+ fake_helper_scripts_dir = "#{fakeroot}/usr/share/#{GLOBAL_NAMESPACE_DIRNAME}/helper-scripts"
+ fake_resources_dir = "#{fakeroot}/usr/share/#{GLOBAL_NAMESPACE_DIRNAME}"
+@@ -326,7 +326,6 @@
+ fake_ruby_extension_source_dir = "#{fakeroot}/usr/share/#{GLOBAL_NAMESPACE_DIRNAME}/ruby_extension_source"
+ fake_nginx_module_source_dir = "#{fakeroot}/usr/share/#{GLOBAL_NAMESPACE_DIRNAME}/ngx_http_passenger_module"
+
+- sh "rm -rf #{fakeroot}"
+ sh "mkdir -p #{fakeroot}"
+
+ # Ruby sources
+@@ -405,10 +404,6 @@
+ end
+ end
+
+- # Apache 2 module
+- sh "mkdir -p #{fake_apache2_module_dir}"
+- sh "cp #{APACHE2_MODULE} #{fake_apache2_module_dir}/"
+-
+ # Ruby extension sources
+ sh "mkdir -p #{fake_ruby_extension_source_dir}"
+ sh "cp -R #{PhusionPassenger.ruby_extension_source_dir}/* #{fake_ruby_extension_source_dir}"
diff --git a/www-apache/passenger/files/passenger-4.0.33-gentoo.patch b/www-apache/passenger/files/passenger-4.0.33-gentoo.patch
new file mode 100644
index 000000000000..843082b44b90
--- /dev/null
+++ b/www-apache/passenger/files/passenger-4.0.33-gentoo.patch
@@ -0,0 +1,30 @@
+--- build/packaging.rb.~1~ 2014-01-09 07:02:51.715076000 +0100
++++ build/packaging.rb 2014-01-09 07:25:14.182743725 +0100
+@@ -361,7 +361,7 @@
+ psg_ruby_extension_source_dir = "#{fs_datadir}/#{GLOBAL_NAMESPACE_DIRNAME}/ruby_extension_source"
+ psg_nginx_module_source_dir = "#{fs_datadir}/#{GLOBAL_NAMESPACE_DIRNAME}/ngx_http_passenger_module"
+
+- fakeroot = "pkg/fakeroot"
++ fakeroot = ENV['DISTDIR']
+ fake_rubylibdir = "#{fakeroot}#{psg_rubylibdir}"
+ fake_nodelibdir = "#{fakeroot}#{psg_nodelibdir}"
+ fake_libdir = "#{fakeroot}#{psg_libdir}"
+@@ -379,7 +379,6 @@
+
+ native_packaging_method = ENV['NATIVE_PACKAGING_METHOD'] || "deb"
+
+- sh "rm -rf #{fakeroot}"
+ sh "mkdir -p #{fakeroot}"
+
+ # Ruby sources
+@@ -464,10 +463,6 @@
+ end
+ end
+
+- # Apache 2 module
+- sh "mkdir -p #{File.dirname(fake_apache2_module_path)}"
+- sh "cp #{APACHE2_MODULE} #{fake_apache2_module_path}"
+-
+ # Ruby extension sources
+ sh "mkdir -p #{fake_ruby_extension_source_dir}"
+ sh "cp -R #{PhusionPassenger.ruby_extension_source_dir}/* #{fake_ruby_extension_source_dir}"
diff --git a/www-apache/passenger/files/passenger-4.0.49-gentoo.patch b/www-apache/passenger/files/passenger-4.0.49-gentoo.patch
new file mode 100644
index 000000000000..8365fbd20fb5
--- /dev/null
+++ b/www-apache/passenger/files/passenger-4.0.49-gentoo.patch
@@ -0,0 +1,30 @@
+--- build/packaging.rb.~1~ 2013-10-27 00:00:00.000000000 +0200
++++ build/packaging.rb 2014-08-23 08:35:20.372738004 +0200
+@@ -429,7 +429,7 @@
+ psg_ruby_extension_source_dir = "#{fs_datadir}/#{GLOBAL_NAMESPACE_DIRNAME}/ruby_extension_source"
+ psg_nginx_module_source_dir = "#{fs_datadir}/#{GLOBAL_NAMESPACE_DIRNAME}/ngx_http_passenger_module"
+
+- fakeroot = "pkg/fakeroot"
++ fakeroot = ENV['DISTDIR']
+ fake_rubylibdir = "#{fakeroot}#{psg_rubylibdir}"
+ fake_nodelibdir = "#{fakeroot}#{psg_nodelibdir}"
+ fake_libdir = "#{fakeroot}#{psg_libdir}"
+@@ -447,7 +447,6 @@
+
+ native_packaging_method = ENV['NATIVE_PACKAGING_METHOD'] || "deb"
+
+- sh "rm -rf #{fakeroot}"
+ sh "mkdir -p #{fakeroot}"
+
+ # Ruby sources
+@@ -532,10 +531,6 @@
+ end
+ end
+
+- # Apache 2 module
+- sh "mkdir -p #{File.dirname(fake_apache2_module_path)}"
+- sh "cp #{APACHE2_MODULE} #{fake_apache2_module_path}"
+-
+ # Ruby extension sources
+ sh "mkdir -p #{fake_ruby_extension_source_dir}"
+ sh "cp -R #{PhusionPassenger.ruby_extension_source_dir}/* #{fake_ruby_extension_source_dir}"
diff --git a/www-apache/passenger/files/passenger-5.0.4-gentoo.patch b/www-apache/passenger/files/passenger-5.0.4-gentoo.patch
new file mode 100644
index 000000000000..713deb070324
--- /dev/null
+++ b/www-apache/passenger/files/passenger-5.0.4-gentoo.patch
@@ -0,0 +1,30 @@
+--- build/packaging.rb.orig 2015-03-14 06:52:27.284475606 +0100
++++ build/packaging.rb 2015-03-14 06:52:35.128268388 +0100
+@@ -513,7 +513,7 @@
+ psg_ruby_extension_source_dir = "#{fs_datadir}/#{GLOBAL_NAMESPACE_DIRNAME}/ruby_extension_source"
+ psg_nginx_module_source_dir = "#{fs_datadir}/#{GLOBAL_NAMESPACE_DIRNAME}/ngx_http_passenger_module"
+
+- fakeroot = "pkg/fakeroot"
++ fakeroot = ENV['DISTDIR']
+ fake_rubylibdir = "#{fakeroot}#{psg_rubylibdir}"
+ fake_nodelibdir = "#{fakeroot}#{psg_nodelibdir}"
+ fake_libdir = "#{fakeroot}#{psg_libdir}"
+@@ -531,7 +531,6 @@
+
+ packaging_method = ENV['NATIVE_PACKAGING_METHOD'] || ENV['PACKAGING_METHOD'] || "deb"
+
+- sh "rm -rf #{fakeroot}"
+ sh "mkdir -p #{fakeroot}"
+
+ # Ruby sources
+@@ -622,10 +621,6 @@
+ end
+ end
+
+- # Apache 2 module
+- sh "mkdir -p #{File.dirname(fake_apache2_module_path)}"
+- sh "cp #{APACHE2_MODULE} #{fake_apache2_module_path}"
+-
+ # Ruby extension sources
+ sh "mkdir -p #{fake_ruby_extension_source_dir}"
+ sh "cp -R #{PhusionPassenger.ruby_extension_source_dir}/* #{fake_ruby_extension_source_dir}"
diff --git a/www-apache/passenger/metadata.xml b/www-apache/passenger/metadata.xml
new file mode 100644
index 000000000000..599a1267de8e
--- /dev/null
+++ b/www-apache/passenger/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>graaff@gentoo.org</email>
+ </maintainer>
+ <herd>ruby</herd>
+ <upstream>
+ <remote-id type="rubyforge">passenger</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/www-apache/passenger/passenger-4.0.53.ebuild b/www-apache/passenger/passenger-4.0.53.ebuild
new file mode 100644
index 000000000000..4502b5502f81
--- /dev/null
+++ b/www-apache/passenger/passenger-4.0.53.ebuild
@@ -0,0 +1,118 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+USE_RUBY="ruby19 ruby20"
+
+inherit apache-module flag-o-matic multilib ruby-ng toolchain-funcs
+
+DESCRIPTION="Passenger (a.k.a. mod_rails) makes deployment of Ruby on Rails applications a breeze"
+HOMEPAGE="http://modrails.com/"
+SRC_URI="http://s3.amazonaws.com/phusion-passenger/releases/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="debug"
+
+ruby_add_bdepend "dev-ruby/rake"
+
+ruby_add_rdepend "
+ >=dev-ruby/daemon_controller-1.2.0
+ >=dev-ruby/rack-1.0.0
+ >=dev-ruby/rake-0.8.1"
+
+CDEPEND=">=dev-libs/libev-4.15 net-misc/curl[ssl]
+ www-servers/apache[apache2_modules_unixd(+)]"
+
+RDEPEND="${RDEPEND} ${CDEPEND}"
+DEPEND="${DEPEND} ${CDEPEND}"
+
+APACHE2_MOD_CONF="30_mod_${PN}-4.0.0 30_mod_${PN}"
+APACHE2_MOD_DEFINE="PASSENGER"
+
+need_apache2
+
+pkg_setup() {
+ use debug && append-flags -DPASSENGER_DEBUG
+}
+
+all_ruby_prepare() {
+ epatch "${FILESDIR}"/${PN}-4.0.49-gentoo.patch
+
+ # Change these with sed instead of a patch so that we can easily use
+ # the toolchain-funcs methods.
+ sed -i -e "s/gcc/$(tc-getCC)/" \
+ -e "s/g++/$(tc-getCXX)/" \
+ -e 's/PlatformInfo.debugging_cflags//' build/basics.rb || die
+
+ # Avoid fixed debugging CFLAGs.
+ sed -e '/debugging_cflags/areturn ""' -i lib/phusion_passenger/platform_info/compiler.rb || die
+
+ # Use sed here so that we can dynamically set the documentation directory.
+ sed -i -e "s:/usr/share/doc/passenger:/usr/share/doc/${P}:" \
+ -e "s:/usr/lib/apache2/modules/mod_passenger.so:${APACHE_MODULESDIR}/mod_passenger.so:" \
+ -e "s:/usr/lib/phusion-passenger/agents:/usr/libexec/phusion-passenger/agents:" \
+ lib/phusion_passenger.rb || die
+ sed -i -e "s:/usr/lib/phusion-passenger/agents:/usr/libexec/phusion-passenger/agents:" ext/common/ResourceLocator.h || die
+
+ # Don't install a tool that won't work in our setup.
+ sed -i -e '/passenger-install-apache2-module/d' lib/phusion_passenger/packaging.rb || die
+ rm -f bin/passenger-install-apache2-module || die "Unable to remove unneeded install script."
+
+ # Make sure we use the system-provided version.
+ rm -rf ext/libev || die "Unable to remove vendored libev."
+
+ # Avoid building documentation to avoid a dependency on mizuho.
+ #sed -i -e 's/, :doc//' build/packaging.rb || die
+ touch doc/*.html || die
+
+ # Use the correct arch-specific lib directory
+ sed -i -e 's:/usr/lib/:/usr/'$(get_libdir)'/:' build/packaging.rb || die
+
+ # Fix hard-coded use of AR
+ sed -i -e "s/ar cru/"$(tc-getAR)" cru/" build/cplusplus_support.rb || die
+}
+
+all_ruby_compile() {
+ V=1 EXTRA_LDFLAGS="${LDFLAGS}" \
+ APXS2="${APXS}" \
+ HTTPD="${APACHE_BIN}" \
+ USE_VENDORED_LIBEV="no" LIBEV_LIBS="-lev" \
+ ruby -S rake apache2 || die "rake failed"
+}
+
+each_ruby_compile() {
+ append-flags -fno-strict-aliasing
+
+ V=1 EXTRA_LDFLAGS="${LDFLAGS}" \
+ APXS2="${APXS}" \
+ HTTPD="${APACHE_BIN}" \
+ USE_VENDORED_LIBEV="no" LIBEV_LIBS="-lev" \
+ ${RUBY} -S rake native_support || die "rake failed"
+}
+
+all_ruby_install() {
+ APACHE2_MOD_FILE="${S}/buildout/apache2/mod_${PN}.so"
+ apache-module_src_install
+
+ # Patch in the correct libdir
+ sed -i -e 's:/usr/lib/:/usr/'$(get_libdir)'/:' "${D}${APACHE_MODULES_CONFDIR}/30_mod_${PN}.conf" || die
+}
+
+each_ruby_install() {
+ DISTDIR="${D}" \
+ RUBYLIBDIR="$(ruby_rbconfig_value vendordir)" \
+ RUBYARCHDIR="$(ruby_rbconfig_value archdir)" \
+ APXS2="${APXS}" \
+ HTTPD="${APACHE_BIN}" \
+ EXTRA_LDFLAGS="${LDFLAGS}" \
+ USE_VENDORED_LIBEV="no" LIBEV_LIBS="-lev" \
+ ${RUBY} -S rake fakeroot || die "rake failed"
+}
+
+pkg_postint() {
+ einfo "The apache module is compiled for the currently eselected ruby."
+ einfo" If you eselect another ruby you must recompile passenger as well."
+}
diff --git a/www-apache/passenger/passenger-4.0.59.ebuild b/www-apache/passenger/passenger-4.0.59.ebuild
new file mode 100644
index 000000000000..a0e70011afe0
--- /dev/null
+++ b/www-apache/passenger/passenger-4.0.59.ebuild
@@ -0,0 +1,115 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+USE_RUBY="ruby19 ruby20 ruby21 ruby22"
+
+inherit apache-module flag-o-matic multilib ruby-ng toolchain-funcs
+
+DESCRIPTION="Passenger (a.k.a. mod_rails) makes deployment of Ruby on Rails applications a breeze"
+HOMEPAGE="http://modrails.com/"
+SRC_URI="http://s3.amazonaws.com/phusion-passenger/releases/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug"
+
+ruby_add_bdepend "dev-ruby/rake"
+
+ruby_add_rdepend "
+ >=dev-ruby/daemon_controller-1.2.0
+ >=dev-ruby/rack-1.0.0
+ >=dev-ruby/rake-0.8.1"
+
+CDEPEND=">=dev-libs/libev-4.15 net-misc/curl[ssl]
+ www-servers/apache[apache2_modules_unixd(+)]"
+
+RDEPEND="${RDEPEND} ${CDEPEND}"
+DEPEND="${DEPEND} ${CDEPEND}"
+
+APACHE2_MOD_CONF="30_mod_${PN}-4.0.0 30_mod_${PN}"
+APACHE2_MOD_DEFINE="PASSENGER"
+
+need_apache2
+
+pkg_setup() {
+ use debug && append-flags -DPASSENGER_DEBUG
+}
+
+all_ruby_prepare() {
+ epatch "${FILESDIR}"/${PN}-4.0.49-gentoo.patch
+
+ # Change these with sed instead of a patch so that we can easily use
+ # the toolchain-funcs methods.
+ sed -i -e "s/gcc/$(tc-getCC)/" \
+ -e "s/g++/$(tc-getCXX)/" \
+ -e 's/PlatformInfo.debugging_cflags//' build/basics.rb || die
+
+ # Avoid fixed debugging CFLAGs.
+ sed -e '/debugging_cflags/areturn ""' -i lib/phusion_passenger/platform_info/compiler.rb || die
+
+ # Use sed here so that we can dynamically set the documentation directory.
+ sed -i -e "s:/usr/share/doc/passenger:/usr/share/doc/${P}:" \
+ -e "s:/usr/lib/apache2/modules/mod_passenger.so:${APACHE_MODULESDIR}/mod_passenger.so:" \
+ -e "s:/usr/lib/phusion-passenger/agents:/usr/libexec/phusion-passenger/agents:" \
+ lib/phusion_passenger.rb || die
+ sed -i -e "s:/usr/lib/phusion-passenger/agents:/usr/libexec/phusion-passenger/agents:" ext/common/ResourceLocator.h || die
+
+ # Don't install a tool that won't work in our setup.
+ sed -i -e '/passenger-install-apache2-module/d' lib/phusion_passenger/packaging.rb || die
+ rm -f bin/passenger-install-apache2-module || die "Unable to remove unneeded install script."
+
+ # Make sure we use the system-provided version.
+ rm -rf ext/libev || die "Unable to remove vendored libev."
+
+ # Avoid building documentation to avoid a dependency on mizuho.
+ #sed -i -e 's/, :doc//' build/packaging.rb || die
+ touch doc/*.html || die
+
+ # Use the correct arch-specific lib directory
+ sed -i -e 's:/usr/lib/:/usr/'$(get_libdir)'/:' build/packaging.rb || die
+
+ # Fix hard-coded use of AR
+ sed -i -e "s/ar cru/"$(tc-getAR)" cru/" build/cplusplus_support.rb || die
+}
+
+all_ruby_compile() {
+ V=1 EXTRA_LDFLAGS="${LDFLAGS}" \
+ APXS2="${APXS}" \
+ HTTPD="${APACHE_BIN}" \
+ USE_VENDORED_LIBEV="no" LIBEV_LIBS="-lev" \
+ ruby -S rake apache2 || die "rake failed"
+}
+
+each_ruby_compile() {
+ append-flags -fno-strict-aliasing
+
+ V=1 EXTRA_LDFLAGS="${LDFLAGS}" \
+ APXS2="${APXS}" \
+ HTTPD="${APACHE_BIN}" \
+ USE_VENDORED_LIBEV="no" LIBEV_LIBS="-lev" \
+ ${RUBY} -S rake native_support || die "rake failed"
+}
+
+all_ruby_install() {
+ APACHE2_MOD_FILE="${S}/buildout/apache2/mod_${PN}.so"
+ apache-module_src_install
+
+ # Patch in the correct libdir
+ sed -i -e 's:/usr/lib/:/usr/'$(get_libdir)'/:' "${D}${APACHE_MODULES_CONFDIR}/30_mod_${PN}.conf" || die
+
+ dodoc CHANGELOG README.md
+}
+
+each_ruby_install() {
+ DISTDIR="${D}" \
+ RUBYLIBDIR="$(ruby_rbconfig_value vendordir)" \
+ RUBYARCHDIR="$(ruby_rbconfig_value archdir)" \
+ APXS2="${APXS}" \
+ HTTPD="${APACHE_BIN}" \
+ EXTRA_LDFLAGS="${LDFLAGS}" \
+ USE_VENDORED_LIBEV="no" LIBEV_LIBS="-lev" \
+ ${RUBY} -S rake fakeroot || die "rake failed"
+}
diff --git a/www-apache/passenger/passenger-5.0.13.ebuild b/www-apache/passenger/passenger-5.0.13.ebuild
new file mode 100644
index 000000000000..79dd68d10996
--- /dev/null
+++ b/www-apache/passenger/passenger-5.0.13.ebuild
@@ -0,0 +1,118 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+USE_RUBY="ruby19 ruby20 ruby21 ruby22"
+
+inherit apache-module flag-o-matic multilib ruby-ng toolchain-funcs
+
+DESCRIPTION="Passenger (a.k.a. mod_rails) makes deployment of Ruby on Rails applications a breeze"
+HOMEPAGE="http://modrails.com/"
+SRC_URI="http://s3.amazonaws.com/phusion-passenger/releases/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug"
+
+ruby_add_bdepend "dev-ruby/rake"
+
+ruby_add_rdepend "
+ >=dev-ruby/rack-1.0.0:*
+ >=dev-ruby/rake-0.8.1"
+
+# libev is bundled but with adapations that do not seem to be accepted
+# upstream, so we must use the bundled version :-(
+CDEPEND="
+ >=dev-libs/libuv-1.5.0
+ net-misc/curl[ssl]
+ www-servers/apache[apache2_modules_unixd(+)]"
+
+RDEPEND="${RDEPEND} ${CDEPEND}"
+DEPEND="${DEPEND} ${CDEPEND}"
+
+APACHE2_MOD_CONF="30_mod_${PN}-5.0.0 30_mod_${PN}"
+APACHE2_MOD_DEFINE="PASSENGER"
+
+need_apache2
+
+pkg_setup() {
+ use debug && append-flags -DPASSENGER_DEBUG
+}
+
+all_ruby_prepare() {
+ epatch "${FILESDIR}"/${PN}-5.0.4-gentoo.patch
+
+ # Change these with sed instead of a patch so that we can easily use
+ # the toolchain-funcs methods.
+ sed -i -e "/^CC/ s/=.*$/= '$(tc-getCC)'/" \
+ -e "/^CXX/ s/=.*$/= '$(tc-getCXX)'/" \
+ -e 's/PlatformInfo.debugging_cflags//' build/basics.rb || die
+
+ # Avoid fixed debugging CFLAGs.
+ sed -e '/debugging_cflags/areturn ""' -i lib/phusion_passenger/platform_info/compiler.rb || die
+
+ # Use sed here so that we can dynamically set the documentation directory.
+ sed -i -e "s:/usr/share/doc/passenger:/usr/share/doc/${P}:" \
+ -e "s:/usr/lib/apache2/modules/mod_passenger.so:${APACHE_MODULESDIR}/mod_passenger.so:" \
+ -e "s:/usr/lib/phusion-passenger/agents:/usr/libexec/phusion-passenger/agents:" \
+ lib/phusion_passenger.rb || die
+ sed -i -e "s:/usr/lib/phusion-passenger/agents:/usr/libexec/phusion-passenger/agents:" ext/common/ResourceLocator.h || die
+
+ # Don't install a tool that won't work in our setup.
+ sed -i -e '/passenger-install-apache2-module/d' lib/phusion_passenger/packaging.rb || die
+ rm -f bin/passenger-install-apache2-module || die "Unable to remove unneeded install script."
+
+ # Make sure we use the system-provided version where possible
+ rm -rf ext/libuv || die "Unable to remove vendored code."
+
+ # Avoid building documentation to avoid a dependency on mizuho.
+ #sed -i -e 's/, :doc//' build/packaging.rb || die
+ touch doc/*.html || die
+
+ # Use the correct arch-specific lib directory
+ sed -i -e 's:/usr/lib/:/usr/'$(get_libdir)'/:' build/packaging.rb || die
+
+ # Fix hard-coded use of AR
+ sed -i -e "s/ar cru/"$(tc-getAR)" cru/" build/cplusplus_support.rb || die
+}
+
+all_ruby_compile() {
+ V=1 EXTRA_LDFLAGS="${LDFLAGS}" \
+ APXS2="${APXS}" \
+ HTTPD="${APACHE_BIN}" \
+ USE_VENDORED_LIBUV="no" LIBUV_LIBS="-luv" \
+ ruby -S rake apache2 || die "rake failed"
+}
+
+each_ruby_compile() {
+ append-flags -fno-strict-aliasing
+
+ V=1 EXTRA_LDFLAGS="${LDFLAGS}" \
+ APXS2="${APXS}" \
+ HTTPD="${APACHE_BIN}" \
+ USE_VENDORED_LIBUV="no" LIBUV_LIBS="-luv" \
+ ${RUBY} -S rake native_support || die "rake failed"
+}
+
+all_ruby_install() {
+ APACHE2_MOD_FILE="${S}/buildout/apache2/mod_${PN}.so"
+ apache-module_src_install
+
+ # Patch in the correct libdir
+ sed -i -e 's:/usr/lib/:/usr/'$(get_libdir)'/:' "${D}${APACHE_MODULES_CONFDIR}/30_mod_${PN}.conf" || die
+
+ dodoc CHANGELOG README.md
+}
+
+each_ruby_install() {
+ DISTDIR="${D}" \
+ RUBYLIBDIR="$(ruby_rbconfig_value vendordir)" \
+ RUBYARCHDIR="$(ruby_rbconfig_value archdir)" \
+ APXS2="${APXS}" \
+ HTTPD="${APACHE_BIN}" \
+ EXTRA_LDFLAGS="${LDFLAGS}" \
+ USE_VENDORED_LIBUV="no" LIBUV_LIBS="-luv" \
+ ${RUBY} -S rake fakeroot || die "rake failed"
+}
diff --git a/www-apache/passenger/passenger-5.0.14.ebuild b/www-apache/passenger/passenger-5.0.14.ebuild
new file mode 100644
index 000000000000..79dd68d10996
--- /dev/null
+++ b/www-apache/passenger/passenger-5.0.14.ebuild
@@ -0,0 +1,118 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+USE_RUBY="ruby19 ruby20 ruby21 ruby22"
+
+inherit apache-module flag-o-matic multilib ruby-ng toolchain-funcs
+
+DESCRIPTION="Passenger (a.k.a. mod_rails) makes deployment of Ruby on Rails applications a breeze"
+HOMEPAGE="http://modrails.com/"
+SRC_URI="http://s3.amazonaws.com/phusion-passenger/releases/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug"
+
+ruby_add_bdepend "dev-ruby/rake"
+
+ruby_add_rdepend "
+ >=dev-ruby/rack-1.0.0:*
+ >=dev-ruby/rake-0.8.1"
+
+# libev is bundled but with adapations that do not seem to be accepted
+# upstream, so we must use the bundled version :-(
+CDEPEND="
+ >=dev-libs/libuv-1.5.0
+ net-misc/curl[ssl]
+ www-servers/apache[apache2_modules_unixd(+)]"
+
+RDEPEND="${RDEPEND} ${CDEPEND}"
+DEPEND="${DEPEND} ${CDEPEND}"
+
+APACHE2_MOD_CONF="30_mod_${PN}-5.0.0 30_mod_${PN}"
+APACHE2_MOD_DEFINE="PASSENGER"
+
+need_apache2
+
+pkg_setup() {
+ use debug && append-flags -DPASSENGER_DEBUG
+}
+
+all_ruby_prepare() {
+ epatch "${FILESDIR}"/${PN}-5.0.4-gentoo.patch
+
+ # Change these with sed instead of a patch so that we can easily use
+ # the toolchain-funcs methods.
+ sed -i -e "/^CC/ s/=.*$/= '$(tc-getCC)'/" \
+ -e "/^CXX/ s/=.*$/= '$(tc-getCXX)'/" \
+ -e 's/PlatformInfo.debugging_cflags//' build/basics.rb || die
+
+ # Avoid fixed debugging CFLAGs.
+ sed -e '/debugging_cflags/areturn ""' -i lib/phusion_passenger/platform_info/compiler.rb || die
+
+ # Use sed here so that we can dynamically set the documentation directory.
+ sed -i -e "s:/usr/share/doc/passenger:/usr/share/doc/${P}:" \
+ -e "s:/usr/lib/apache2/modules/mod_passenger.so:${APACHE_MODULESDIR}/mod_passenger.so:" \
+ -e "s:/usr/lib/phusion-passenger/agents:/usr/libexec/phusion-passenger/agents:" \
+ lib/phusion_passenger.rb || die
+ sed -i -e "s:/usr/lib/phusion-passenger/agents:/usr/libexec/phusion-passenger/agents:" ext/common/ResourceLocator.h || die
+
+ # Don't install a tool that won't work in our setup.
+ sed -i -e '/passenger-install-apache2-module/d' lib/phusion_passenger/packaging.rb || die
+ rm -f bin/passenger-install-apache2-module || die "Unable to remove unneeded install script."
+
+ # Make sure we use the system-provided version where possible
+ rm -rf ext/libuv || die "Unable to remove vendored code."
+
+ # Avoid building documentation to avoid a dependency on mizuho.
+ #sed -i -e 's/, :doc//' build/packaging.rb || die
+ touch doc/*.html || die
+
+ # Use the correct arch-specific lib directory
+ sed -i -e 's:/usr/lib/:/usr/'$(get_libdir)'/:' build/packaging.rb || die
+
+ # Fix hard-coded use of AR
+ sed -i -e "s/ar cru/"$(tc-getAR)" cru/" build/cplusplus_support.rb || die
+}
+
+all_ruby_compile() {
+ V=1 EXTRA_LDFLAGS="${LDFLAGS}" \
+ APXS2="${APXS}" \
+ HTTPD="${APACHE_BIN}" \
+ USE_VENDORED_LIBUV="no" LIBUV_LIBS="-luv" \
+ ruby -S rake apache2 || die "rake failed"
+}
+
+each_ruby_compile() {
+ append-flags -fno-strict-aliasing
+
+ V=1 EXTRA_LDFLAGS="${LDFLAGS}" \
+ APXS2="${APXS}" \
+ HTTPD="${APACHE_BIN}" \
+ USE_VENDORED_LIBUV="no" LIBUV_LIBS="-luv" \
+ ${RUBY} -S rake native_support || die "rake failed"
+}
+
+all_ruby_install() {
+ APACHE2_MOD_FILE="${S}/buildout/apache2/mod_${PN}.so"
+ apache-module_src_install
+
+ # Patch in the correct libdir
+ sed -i -e 's:/usr/lib/:/usr/'$(get_libdir)'/:' "${D}${APACHE_MODULES_CONFDIR}/30_mod_${PN}.conf" || die
+
+ dodoc CHANGELOG README.md
+}
+
+each_ruby_install() {
+ DISTDIR="${D}" \
+ RUBYLIBDIR="$(ruby_rbconfig_value vendordir)" \
+ RUBYARCHDIR="$(ruby_rbconfig_value archdir)" \
+ APXS2="${APXS}" \
+ HTTPD="${APACHE_BIN}" \
+ EXTRA_LDFLAGS="${LDFLAGS}" \
+ USE_VENDORED_LIBUV="no" LIBUV_LIBS="-luv" \
+ ${RUBY} -S rake fakeroot || die "rake failed"
+}
diff --git a/www-apache/passenger/passenger-5.0.4.ebuild b/www-apache/passenger/passenger-5.0.4.ebuild
new file mode 100644
index 000000000000..4d751ed7252a
--- /dev/null
+++ b/www-apache/passenger/passenger-5.0.4.ebuild
@@ -0,0 +1,114 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+USE_RUBY="ruby19 ruby20 ruby21 ruby22"
+
+inherit apache-module flag-o-matic multilib ruby-ng toolchain-funcs
+
+DESCRIPTION="Passenger (a.k.a. mod_rails) makes deployment of Ruby on Rails applications a breeze"
+HOMEPAGE="http://modrails.com/"
+SRC_URI="http://s3.amazonaws.com/phusion-passenger/releases/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug"
+
+ruby_add_bdepend "dev-ruby/rake"
+
+ruby_add_rdepend "
+ >=dev-ruby/rack-1.0.0
+ >=dev-ruby/rake-0.8.1"
+
+CDEPEND=">=dev-libs/libev-4.15 net-misc/curl[ssl]
+ www-servers/apache[apache2_modules_unixd(+)]"
+
+RDEPEND="${RDEPEND} ${CDEPEND}"
+DEPEND="${DEPEND} ${CDEPEND}"
+
+APACHE2_MOD_CONF="30_mod_${PN}-5.0.0 30_mod_${PN}"
+APACHE2_MOD_DEFINE="PASSENGER"
+
+need_apache2
+
+pkg_setup() {
+ use debug && append-flags -DPASSENGER_DEBUG
+}
+
+all_ruby_prepare() {
+ epatch "${FILESDIR}"/${PN}-5.0.4-gentoo.patch
+
+ # Change these with sed instead of a patch so that we can easily use
+ # the toolchain-funcs methods.
+ sed -i -e "/^CC/ s/=.*$/= '$(tc-getCC)'/" \
+ -e "/^CXX/ s/=.*$/= '$(tc-getCXX)'/" \
+ -e 's/PlatformInfo.debugging_cflags//' build/basics.rb || die
+
+ # Avoid fixed debugging CFLAGs.
+ sed -e '/debugging_cflags/areturn ""' -i lib/phusion_passenger/platform_info/compiler.rb || die
+
+ # Use sed here so that we can dynamically set the documentation directory.
+ sed -i -e "s:/usr/share/doc/passenger:/usr/share/doc/${P}:" \
+ -e "s:/usr/lib/apache2/modules/mod_passenger.so:${APACHE_MODULESDIR}/mod_passenger.so:" \
+ -e "s:/usr/lib/phusion-passenger/agents:/usr/libexec/phusion-passenger/agents:" \
+ lib/phusion_passenger.rb || die
+ sed -i -e "s:/usr/lib/phusion-passenger/agents:/usr/libexec/phusion-passenger/agents:" ext/common/ResourceLocator.h || die
+
+ # Don't install a tool that won't work in our setup.
+ sed -i -e '/passenger-install-apache2-module/d' lib/phusion_passenger/packaging.rb || die
+ rm -f bin/passenger-install-apache2-module || die "Unable to remove unneeded install script."
+
+ # Make sure we use the system-provided version.
+ rm -rf ext/libev || die "Unable to remove vendored libev."
+
+ # Avoid building documentation to avoid a dependency on mizuho.
+ #sed -i -e 's/, :doc//' build/packaging.rb || die
+ touch doc/*.html || die
+
+ # Use the correct arch-specific lib directory
+ sed -i -e 's:/usr/lib/:/usr/'$(get_libdir)'/:' build/packaging.rb || die
+
+ # Fix hard-coded use of AR
+ sed -i -e "s/ar cru/"$(tc-getAR)" cru/" build/cplusplus_support.rb || die
+}
+
+all_ruby_compile() {
+ V=1 EXTRA_LDFLAGS="${LDFLAGS}" \
+ APXS2="${APXS}" \
+ HTTPD="${APACHE_BIN}" \
+ USE_VENDORED_LIBEV="no" LIBEV_LIBS="-lev" \
+ ruby -S rake apache2 || die "rake failed"
+}
+
+each_ruby_compile() {
+ append-flags -fno-strict-aliasing
+
+ V=1 EXTRA_LDFLAGS="${LDFLAGS}" \
+ APXS2="${APXS}" \
+ HTTPD="${APACHE_BIN}" \
+ USE_VENDORED_LIBEV="no" LIBEV_LIBS="-lev" \
+ ${RUBY} -S rake native_support || die "rake failed"
+}
+
+all_ruby_install() {
+ APACHE2_MOD_FILE="${S}/buildout/apache2/mod_${PN}.so"
+ apache-module_src_install
+
+ # Patch in the correct libdir
+ sed -i -e 's:/usr/lib/:/usr/'$(get_libdir)'/:' "${D}${APACHE_MODULES_CONFDIR}/30_mod_${PN}.conf" || die
+
+ dodoc CHANGELOG README.md
+}
+
+each_ruby_install() {
+ DISTDIR="${D}" \
+ RUBYLIBDIR="$(ruby_rbconfig_value vendordir)" \
+ RUBYARCHDIR="$(ruby_rbconfig_value archdir)" \
+ APXS2="${APXS}" \
+ HTTPD="${APACHE_BIN}" \
+ EXTRA_LDFLAGS="${LDFLAGS}" \
+ USE_VENDORED_LIBEV="no" LIBEV_LIBS="-lev" \
+ ${RUBY} -S rake fakeroot || die "rake failed"
+}
diff --git a/www-apache/pwauth/Manifest b/www-apache/pwauth/Manifest
new file mode 100644
index 000000000000..fa6fcf803bcb
--- /dev/null
+++ b/www-apache/pwauth/Manifest
@@ -0,0 +1 @@
+DIST pwauth-2.3.10.tar.gz 23825 SHA256 267813acccc58d407b735ebfd32ee7ec52726379d0aa3670731d2ea4c9d85906 SHA512 a2f02f2c8b61d87cc0c034952e17f187bbc358506052a31107ccd38a938d59862f0ee18362c84984c900d2986bb35abbbd5877d4cf973a0215a6ec3656a23bff WHIRLPOOL 694fa855c2129c13fa18869bb58eef4a0ca6261e7aa84bf454a567270ae129929aada49474a372b082b9ee1d30c0af83cc44e2351be49eb70b123d5f977f6c8f
diff --git a/www-apache/pwauth/files/pwauth-2.3.10-config.patch b/www-apache/pwauth/files/pwauth-2.3.10-config.patch
new file mode 100644
index 000000000000..03ae3b876d99
--- /dev/null
+++ b/www-apache/pwauth/files/pwauth-2.3.10-config.patch
@@ -0,0 +1,38 @@
+--- config.h.orig 2013-01-01 19:33:54.053978814 +0400
++++ config.h 2013-01-01 19:35:09.764049695 +0400
+@@ -112,7 +112,7 @@
+
+ /* #define SHADOW_NONE /**/
+ /* #define SHADOW_BSD /* FreeBSD, NetBSD, OpenBSD, BSDI, OS X */
+-#define SHADOW_SUN /* Linux, Solaris, IRIX */
++/* #define SHADOW_SUN /* Linux, Solaris, IRIX */
+ /* #define SHADOW_JFH /**/
+ /* #define SHADOW_MDW /**/
+ /* #define SHADOW_AIX /* AIX */
+@@ -245,7 +245,7 @@
+ * to change the uid list.
+ */
+
+-#define SERVER_UIDS 30 /* user "wwwrun" on the author's system */
++/* #define SERVER_UIDS 81 /* user "nobody" */
+
+
+ /* If MIN_UNIX_UID is defined to an integer, logins with uid numbers less than
+@@ -257,7 +257,7 @@
+ * given value will be accepted).
+ */
+
+-#define MIN_UNIX_UID 500 /**/
++/* #define MIN_UNIX_UID 500 /**/
+
+
+ /* If IGNORE_CASE is defined, the login given is checked in two different
+@@ -285,7 +285,7 @@
+ * SLEEP_LOCK. SLEEP_TIME defaults to 2 seconds if not defined.
+ */
+
+-#define SLEEP_LOCK "/var/run/pwauth.lock"
++#define SLEEP_LOCK "/var/lock/pwauth.lock"
+
+
+ /* If ENV_METHOD is defined, pwauth expects mod_auth_external to be configured
diff --git a/www-apache/pwauth/files/pwauth-2.3.10-makefile.patch b/www-apache/pwauth/files/pwauth-2.3.10-makefile.patch
new file mode 100644
index 000000000000..a211a06b7231
--- /dev/null
+++ b/www-apache/pwauth/files/pwauth-2.3.10-makefile.patch
@@ -0,0 +1,42 @@
+--- Makefile.orig 2013-01-01 20:19:30.061522843 +0400
++++ Makefile 2013-01-01 20:20:00.356551208 +0400
+@@ -2,19 +2,7 @@
+ # system. Most of the configurable stuff is in config.h
+ #
+ # CC= an ansi-C compiler. If "cc" doesn't work, try "gcc".
+-# LIB= libraries to link in. -lcrypt, -lshadow, -lpam sometimes needed.
+-# LOCALFLAGS= compiler flags. Usually -g, -O, and stuff like that.
+-
+-# Settings for author's system (Redhat 6.1)
+-CC=gcc
+-LIB= -lcrypt
+-LOCALFLAGS= -g
+-
+-# For PAM on Redhat Linux
+-# LIB=-lpam -ldl
+-
+-# For PAM on Solaris or OS X
+-# LIB=-lpam
++# LIBS= libraries to link in. -lcrypt, -lshadow, -lpam sometimes needed.
+
+ # -------------------- No User Servicable Parts Below -----------------------
+
+@@ -25,16 +13,14 @@
+
+ .PHONY: clean distclean
+
+-CFLAGS= $(LOCALFLAGS)
+-
+ pwauth: main.o auth_aix.o auth_bsd.o auth_hpux.o auth_mdw.o auth_openbsd.o \
+ auth_pam.o auth_sun.o fail_log.o lastlog.o nologin.o snooze.o
+ $(CC) -o pwauth $(CFLAGS) main.o auth_aix.o auth_bsd.o auth_hpux.o \
+ auth_mdw.o auth_openbsd.o auth_pam.o auth_sun.o fail_log.o \
+- lastlog.o nologin.o snooze.o $(LIB)
++ lastlog.o nologin.o snooze.o $(LDFLAGS) $(LIBS)
+
+ checkfaillog: checkfaillog.o fail_check.o
+- $(CC) -o checkfaillog $(CFLAGS) checkfaillog.o fail_check.o $(LIB)
++ $(CC) -o checkfaillog $(CFLAGS) checkfaillog.o fail_check.o $(LDFLAGS) $(LIBS)
+
+ main.o: main.c config.h pwauth.h fail_log.h
+ auth_aix.o: auth_aix.c config.h pwauth.h
diff --git a/www-apache/pwauth/files/pwauth-strchr.patch b/www-apache/pwauth/files/pwauth-strchr.patch
new file mode 100644
index 000000000000..0c5d6581c96b
--- /dev/null
+++ b/www-apache/pwauth/files/pwauth-strchr.patch
@@ -0,0 +1,11 @@
+--- main.c.orig 2013-01-01 19:45:32.389626661 +0400
++++ main.c 2013-01-01 19:45:50.524643637 +0400
+@@ -48,7 +48,7 @@
+ char *login, *passwd;
+ #else
+ char login[BFSZ+1], passwd[BFSZ+1];
+- char *c, *strchr();
++ char *c;
+ #endif
+ int uid,i;
+ int status;
diff --git a/www-apache/pwauth/files/pwauth.pam-include b/www-apache/pwauth/files/pwauth.pam-include
new file mode 100644
index 000000000000..7f4f041b28ac
--- /dev/null
+++ b/www-apache/pwauth/files/pwauth.pam-include
@@ -0,0 +1,6 @@
+#%PAM-1.0
+auth required pam_nologin.so
+auth include system-auth
+account include system-auth
+password include system-auth
+session include system-auth
diff --git a/www-apache/pwauth/metadata.xml b/www-apache/pwauth/metadata.xml
new file mode 100644
index 000000000000..f0b4684da6fe
--- /dev/null
+++ b/www-apache/pwauth/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer><email>maintainer-needed@gentoo.org</email></maintainer>
+ <use>
+ <flag name='domain-aware'>Ignore leading domain names in username
+ (Windows compat)</flag>
+ <flag name='faillog'>Log failed login attempts</flag>
+ <flag name='ignore-case'>Ignore string case in username (mostly Windows
+ compat)</flag>
+ </use>
+</pkgmetadata>
diff --git a/www-apache/pwauth/pwauth-2.3.10.ebuild b/www-apache/pwauth/pwauth-2.3.10.ebuild
new file mode 100644
index 000000000000..e19a28810691
--- /dev/null
+++ b/www-apache/pwauth/pwauth-2.3.10.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit base flag-o-matic pam toolchain-funcs
+
+DESCRIPTION="A Unix Web Authenticator"
+HOMEPAGE="http://code.google.com/p/pwauth/"
+SRC_URI="http://pwauth.googlecode.com/files/${P}.tar.gz"
+
+LICENSE="Apache-1.1"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="faillog pam ignore-case domain-aware"
+
+DEPEND="pam? ( virtual/pam )"
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+ "${FILESDIR}/${P}-config.patch"
+ "${FILESDIR}/${P}-makefile.patch"
+ "${FILESDIR}/${PN}-strchr.patch"
+)
+
+pkg_setup() {
+ einfo "You can configure various build time options with ENV variables:"
+ einfo
+ einfo " PWAUTH_FAILLOG Path to logfile for login failures"
+ einfo " (default: /var/log/pwauth.log)"
+ einfo " PWAUTH_SERVERUIDS Comma seperated list of UIDs allowed to run pwauth"
+ einfo " (default: 81)"
+ einfo " PWAUTH_MINUID Minimum UID for which authentication will succeed"
+ einfo " (default: 1000)"
+ einfo
+
+ PWAUTH_FAILLOG="${PWAUTH_FAILLOG:-/var/log/pwauth.log}"
+ PWAUTH_SERVERUIDS="${PWAUTH_SERVERUIDS:-81}"
+ PWAUTH_MINUID="${PWAUTH_MINUID:-1000}"
+
+ append-cflags "-DSERVER_UIDS=${PWAUTH_SERVERUIDS}"
+ append-cflags "-DMIN_UNIX_UID=${PWAUTH_MINUID}"
+
+ if use faillog; then
+ append-cflags -DFAILLOG_PWAUTH
+ append-cflags "-DPATH_FAILLOG=\"\\\"${PWAUTH_FAILLOG}\\\"\""
+ fi
+
+ if use pam; then
+ append-cflags -DPAM
+ append-libs pam
+ else
+ append-cflags -DSHADOW_SUN
+ append-libs crypt
+ fi
+
+ use ignore-case && append-cflags -DIGNORE_CASE
+ use domain-aware && append-cflags -DOMAIN_AWARE
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}"
+}
+
+src_install() {
+ dosbin pwauth unixgroup
+ fperms 4755 /usr/sbin/pwauth
+
+ use pam && newpamd "${FILESDIR}"/pwauth.pam-include pwauth
+
+ dodoc CHANGES FORM_AUTH INSTALL README
+}